-1

Does the virtual filesystem work on top of character devices and network subsystems, or just on top of filesystems and block devices?

Could you also explain a bit about in what sense "the VFS is working on top of" something mean?

Thanks.

A figure from Linux Device Driver seems to say no.

enter image description here

A figure from wikipedia seems to say yes:

enter image description here

Tim
  • 98,580
  • 191
  • 570
  • 977

1 Answers1

1

A virtual filesystem that is based on modern mmap technologies works as a intermediate layer between the foreground memory and the background memory.

On SunOS (this is where the concept is from) there is a generic layer called segvn which is the generic vnode segement driver and a VFS implementation uses segvn to get callbacks from memory faults (typically missing data from the background memory). The background memory used by local filesystems is typically a block device driver, but a VFS may implement anything appropriate, e.g. calling network IO.

So what a VFS implementation actually does is to implement a store method for data that manages to link a data element in the filesystem namespace to e.g. a block on a background storage device.

schily
  • 18,806
  • 5
  • 38
  • 60