1

The VFS knows which user/process has sent read/write request. Is the actual block device aware of these details.

Does 'bio' struct contain any details which point to the user space parameters? Using current_uid(), etc, give the UID as 0 which actually corresponds to kjournald which performs the read/write

1 Answer 1

1

No, the block device doesn't know what process or user caused a disk access. The fundamental reason why it doesn't know is that this concept is not well-defined. There is no direct relationship between a disk access and a file access. For example, if multiple processes read from the same location in the same file at practically the same time, then they may both have a pending read request which trickles down to the hardware. Another example is that a buffered write could take place after the process whose activity caused the write has died.

1
  • 1
    Still btrace (wrapper for blktrace) on Linux can tell you what process triggered a block device I/O operation (at least for some of them) Commented Sep 7, 2017 at 6:25

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.