Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

From "Design and Implementation of the Second Extended Filesystem" I know that ext2 has superblock and inode table stored in disk and superblock will be accessed when mounting the filesystem.

Do memory-backed filesystems (procfs, sysfs, debugfs, etc.) have superblock and inode table too?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

There's no general rule that such filesystems have to have or not have superblocks and inode tables. For the ones you've listed, I don't think there's anything that could be called a superblock or an inode table. These filesystems are in a sense constructed on the fly as you traverse them; in particular the data that may appear via files is not stored in a file. Accessing a file in /proc, /sys or a debugfs connects to a part of the kernel which generates or parses data on the fly. Since there is no notion of block on which data would be stored, there is no notion of superblock. And since the structure of these filesystems is fixed by kernel code (you can't create or move a directory or a file), there's no need for something like inodes.

share|improve this answer
1  
I agree with you that I don't think there are superblock and inode table either. But I think these in-memory filesystems do have inodes. For sysfs, there is a paper "The sysfs Filesystem, OLS'05" and it says that: 1) sysfs is compiled into kernel by default. 2) sysfs cooperates with VFS. 3) sysfs will set up appropriate superblock methods when registering with VFS. 4) sysfs creates inodes (see 6.1 of the paper). –  xanpeng Nov 9 '11 at 15:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.