From the course: Linux Device Drivers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Describe the function of the block layer

Describe the function of the block layer - Linux Tutorial

From the course: Linux Device Drivers

Start my 1-month free trial

Describe the function of the block layer

- [Instructor] Since we're talking about block devices, we want to talk a little bit about the block layer. So let's see how that's involved because block device drivers interact with the block layer. So we'll look at the role of the block layer. We'll talk about queuing of requests that go to your block driver. And we'll talk a little bit more about the caching that the block layer does. The block layer is responsible for managing the request queue. It adds, it can combine or merge requests, schedule requests, so that the access to the disc is faster, more optimized. The order of things is done in a more optimal way. Also the block layer caches disc blocks and buffers for non-block oriented, things like NFS. And the block layer will know information about the disk like partition information. And the key data structure for the block layer and block drivers involved here is a struct gendisk. Let's take a quick look at that.…

Contents