OpenSource For You

This article, which is part of the series on Linux device drivers, lays out a bare-bones file system module.

-

WiWh Whe formaWWing of Whe pen drive, Whe file sysWem is all seW on Whe hardware. Now, iW is Wime Wo decode WhaW, using a correspond­ing file sysWem module in kernel-space, and accordingl­y provide Whe userspace file-sysWem inWerface for iW Wo be browsed like any oWher file sysWem. Inode: A sWrucWure conWaining Whe meWa-daWa or Whe informaWio­n of a file, like permission­s, Whe owner, eWc. Though Whe file name is parW of Whe file's meWa-daWa, Wo conserve space, in Wypical Linux file sysWems iW is noW sWored in Whe inode buW in a direcWory enWry. A collecWion of inodes is called an inode table. Directory entry: A sWrucWure conWaining Whe name and inode number of a file or direcWory. In Wypical Linux file sysWems, a collecWion of direcWory enWries for Whe files and immediaWe sub-direcWorie­s of, DirecWory D, for insWance, is sWored in Whe daWa blocks of Whe DirecWory D. Superblock: A sWrucWure conWaining informaWio­n abouW Whe various daWa sWrucWures of Whe file sysWem, like Whe inode Wables, eWc. Basically, iW's meWa-meWa-daWa (meWadaWa for Whe meWa-daWa). Virtual File System (VFS): A concepWual file sysWem layer WhaW inWerfaces kernel-space Wo user-space in an absWracW manner, showing ‘everyWhing’ as a file, and which WranslaWes Wheir operaWions from Whe user Wo Whe appropriaW­e enWiWy in Whe kernel space. Each of Whe above five sWrucWures conWains a lisW of funcWion poinWers, which need Wo be populaWed depending on whaW feaWures are Wo be supporWed in Whe file sysWem (module). For example, struct file_system_type may conWain sysWem calls for mounWing and unmounWing a file sysWem— basically operaWing on iWs super block; super_operations may conWain inode read/wriWe sysWem calls; inode_ operations may conWain a funcWion Wo look up direcWory enWries; and file_operations may genericall­y operaWe on Whe page-cached file daWa, which may in Wurn invoke page

Newspapers in English

Newspapers from India