190f9f118SMauro Carvalho Chehab===================== 290f9f118SMauro Carvalho ChehabLinux Filesystems API 390f9f118SMauro Carvalho Chehab===================== 490f9f118SMauro Carvalho Chehab 590f9f118SMauro Carvalho ChehabThe Linux VFS 690f9f118SMauro Carvalho Chehab============= 790f9f118SMauro Carvalho Chehab 890f9f118SMauro Carvalho ChehabThe Filesystem types 990f9f118SMauro Carvalho Chehab-------------------- 1090f9f118SMauro Carvalho Chehab 1190f9f118SMauro Carvalho Chehab.. kernel-doc:: include/linux/fs.h 1290f9f118SMauro Carvalho Chehab :internal: 1390f9f118SMauro Carvalho Chehab 1490f9f118SMauro Carvalho ChehabThe Directory Cache 1590f9f118SMauro Carvalho Chehab------------------- 1690f9f118SMauro Carvalho Chehab 1790f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/dcache.c 1890f9f118SMauro Carvalho Chehab :export: 1990f9f118SMauro Carvalho Chehab 2090f9f118SMauro Carvalho Chehab.. kernel-doc:: include/linux/dcache.h 2190f9f118SMauro Carvalho Chehab :internal: 2290f9f118SMauro Carvalho Chehab 2390f9f118SMauro Carvalho ChehabInode Handling 2490f9f118SMauro Carvalho Chehab-------------- 2590f9f118SMauro Carvalho Chehab 2690f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/inode.c 2790f9f118SMauro Carvalho Chehab :export: 2890f9f118SMauro Carvalho Chehab 2990f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/bad_inode.c 3090f9f118SMauro Carvalho Chehab :export: 3190f9f118SMauro Carvalho Chehab 3290f9f118SMauro Carvalho ChehabRegistration and Superblocks 3390f9f118SMauro Carvalho Chehab---------------------------- 3490f9f118SMauro Carvalho Chehab 3590f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/super.c 3690f9f118SMauro Carvalho Chehab :export: 3790f9f118SMauro Carvalho Chehab 3890f9f118SMauro Carvalho ChehabFile Locks 3990f9f118SMauro Carvalho Chehab---------- 4090f9f118SMauro Carvalho Chehab 4190f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/locks.c 4290f9f118SMauro Carvalho Chehab :export: 4390f9f118SMauro Carvalho Chehab 4490f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/locks.c 4590f9f118SMauro Carvalho Chehab :internal: 4690f9f118SMauro Carvalho Chehab 4790f9f118SMauro Carvalho ChehabOther Functions 4890f9f118SMauro Carvalho Chehab--------------- 4990f9f118SMauro Carvalho Chehab 5090f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/mpage.c 5190f9f118SMauro Carvalho Chehab :export: 5290f9f118SMauro Carvalho Chehab 5390f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/namei.c 5490f9f118SMauro Carvalho Chehab :export: 5590f9f118SMauro Carvalho Chehab 5690f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/buffer.c 5790f9f118SMauro Carvalho Chehab :export: 5890f9f118SMauro Carvalho Chehab 5990f9f118SMauro Carvalho Chehab.. kernel-doc:: block/bio.c 6090f9f118SMauro Carvalho Chehab :export: 6190f9f118SMauro Carvalho Chehab 6290f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/seq_file.c 6390f9f118SMauro Carvalho Chehab :export: 6490f9f118SMauro Carvalho Chehab 6590f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/filesystems.c 6690f9f118SMauro Carvalho Chehab :export: 6790f9f118SMauro Carvalho Chehab 6890f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/fs-writeback.c 6990f9f118SMauro Carvalho Chehab :export: 7090f9f118SMauro Carvalho Chehab 7190f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/block_dev.c 7290f9f118SMauro Carvalho Chehab :export: 7390f9f118SMauro Carvalho Chehab 74b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/anon_inodes.c 75b7d3f17fSMatthew Wilcox :export: 76b7d3f17fSMatthew Wilcox 77b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/attr.c 78b7d3f17fSMatthew Wilcox :export: 79b7d3f17fSMatthew Wilcox 80b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/d_path.c 81b7d3f17fSMatthew Wilcox :export: 82b7d3f17fSMatthew Wilcox 83b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/dax.c 84b7d3f17fSMatthew Wilcox :export: 85b7d3f17fSMatthew Wilcox 86b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/direct-io.c 87b7d3f17fSMatthew Wilcox :export: 88b7d3f17fSMatthew Wilcox 89b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/file_table.c 90b7d3f17fSMatthew Wilcox :export: 91b7d3f17fSMatthew Wilcox 92b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/libfs.c 93b7d3f17fSMatthew Wilcox :export: 94b7d3f17fSMatthew Wilcox 95b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/posix_acl.c 96b7d3f17fSMatthew Wilcox :export: 97b7d3f17fSMatthew Wilcox 98b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/stat.c 99b7d3f17fSMatthew Wilcox :export: 100b7d3f17fSMatthew Wilcox 101b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/sync.c 102b7d3f17fSMatthew Wilcox :export: 103b7d3f17fSMatthew Wilcox 104b7d3f17fSMatthew Wilcox.. kernel-doc:: fs/xattr.c 105b7d3f17fSMatthew Wilcox :export: 106b7d3f17fSMatthew Wilcox 10790f9f118SMauro Carvalho ChehabThe proc filesystem 10890f9f118SMauro Carvalho Chehab=================== 10990f9f118SMauro Carvalho Chehab 11090f9f118SMauro Carvalho Chehabsysctl interface 11190f9f118SMauro Carvalho Chehab---------------- 11290f9f118SMauro Carvalho Chehab 11390f9f118SMauro Carvalho Chehab.. kernel-doc:: kernel/sysctl.c 11490f9f118SMauro Carvalho Chehab :export: 11590f9f118SMauro Carvalho Chehab 11690f9f118SMauro Carvalho Chehabproc filesystem interface 11790f9f118SMauro Carvalho Chehab------------------------- 11890f9f118SMauro Carvalho Chehab 11990f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/proc/base.c 12090f9f118SMauro Carvalho Chehab :internal: 12190f9f118SMauro Carvalho Chehab 12290f9f118SMauro Carvalho ChehabEvents based on file descriptors 12390f9f118SMauro Carvalho Chehab================================ 12490f9f118SMauro Carvalho Chehab 12590f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/eventfd.c 12690f9f118SMauro Carvalho Chehab :export: 12790f9f118SMauro Carvalho Chehab 12890f9f118SMauro Carvalho ChehabThe Filesystem for Exporting Kernel Objects 12990f9f118SMauro Carvalho Chehab=========================================== 13090f9f118SMauro Carvalho Chehab 13190f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/sysfs/file.c 13290f9f118SMauro Carvalho Chehab :export: 13390f9f118SMauro Carvalho Chehab 13490f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/sysfs/symlink.c 13590f9f118SMauro Carvalho Chehab :export: 13690f9f118SMauro Carvalho Chehab 13790f9f118SMauro Carvalho ChehabThe debugfs filesystem 13890f9f118SMauro Carvalho Chehab====================== 13990f9f118SMauro Carvalho Chehab 14090f9f118SMauro Carvalho Chehabdebugfs interface 14190f9f118SMauro Carvalho Chehab----------------- 14290f9f118SMauro Carvalho Chehab 14390f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/debugfs/inode.c 14490f9f118SMauro Carvalho Chehab :export: 14590f9f118SMauro Carvalho Chehab 14690f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/debugfs/file.c 14790f9f118SMauro Carvalho Chehab :export: 14890f9f118SMauro Carvalho Chehab 14990f9f118SMauro Carvalho ChehabThe Linux Journalling API 15090f9f118SMauro Carvalho Chehab========================= 15190f9f118SMauro Carvalho Chehab 15290f9f118SMauro Carvalho ChehabOverview 15390f9f118SMauro Carvalho Chehab-------- 15490f9f118SMauro Carvalho Chehab 15590f9f118SMauro Carvalho ChehabDetails 15690f9f118SMauro Carvalho Chehab~~~~~~~ 15790f9f118SMauro Carvalho Chehab 15890f9f118SMauro Carvalho ChehabThe journalling layer is easy to use. You need to first of all create a 15990f9f118SMauro Carvalho Chehabjournal_t data structure. There are two calls to do this dependent on 16090f9f118SMauro Carvalho Chehabhow you decide to allocate the physical media on which the journal 1617a2208f6SMauro Carvalho Chehabresides. The :c:func:`jbd2_journal_init_inode` call is for journals stored in 1627a2208f6SMauro Carvalho Chehabfilesystem inodes, or the :c:func:`jbd2_journal_init_dev` call can be used 16390f9f118SMauro Carvalho Chehabfor journal stored on a raw device (in a continuous range of blocks). A 16490f9f118SMauro Carvalho Chehabjournal_t is a typedef for a struct pointer, so when you are finally 1657a2208f6SMauro Carvalho Chehabfinished make sure you call :c:func:`jbd2_journal_destroy` on it to free up 16690f9f118SMauro Carvalho Chehabany used kernel memory. 16790f9f118SMauro Carvalho Chehab 16890f9f118SMauro Carvalho ChehabOnce you have got your journal_t object you need to 'mount' or load the 16990f9f118SMauro Carvalho Chehabjournal file. The journalling layer expects the space for the journal 17090f9f118SMauro Carvalho Chehabwas already allocated and initialized properly by the userspace tools. 1717a2208f6SMauro Carvalho ChehabWhen loading the journal you must call :c:func:`jbd2_journal_load` to process 17290f9f118SMauro Carvalho Chehabjournal contents. If the client file system detects the journal contents 17390f9f118SMauro Carvalho Chehabdoes not need to be processed (or even need not have valid contents), it 1747a2208f6SMauro Carvalho Chehabmay call :c:func:`jbd2_journal_wipe` to clear the journal contents before 1757a2208f6SMauro Carvalho Chehabcalling :c:func:`jbd2_journal_load`. 17690f9f118SMauro Carvalho Chehab 17790f9f118SMauro Carvalho ChehabNote that jbd2_journal_wipe(..,0) calls 1787a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_skip_recovery` for you if it detects any outstanding 1797a2208f6SMauro Carvalho Chehabtransactions in the journal and similarly :c:func:`jbd2_journal_load` will 1807a2208f6SMauro Carvalho Chehabcall :c:func:`jbd2_journal_recover` if necessary. I would advise reading 1817a2208f6SMauro Carvalho Chehab:c:func:`ext4_load_journal` in fs/ext4/super.c for examples on this stage. 18290f9f118SMauro Carvalho Chehab 18390f9f118SMauro Carvalho ChehabNow you can go ahead and start modifying the underlying filesystem. 18490f9f118SMauro Carvalho ChehabAlmost. 18590f9f118SMauro Carvalho Chehab 18690f9f118SMauro Carvalho ChehabYou still need to actually journal your filesystem changes, this is done 18790f9f118SMauro Carvalho Chehabby wrapping them into transactions. Additionally you also need to wrap 18890f9f118SMauro Carvalho Chehabthe modification of each of the buffers with calls to the journal layer, 18990f9f118SMauro Carvalho Chehabso it knows what the modifications you are actually making are. To do 1907a2208f6SMauro Carvalho Chehabthis use :c:func:`jbd2_journal_start` which returns a transaction handle. 19190f9f118SMauro Carvalho Chehab 1927a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_start` and its counterpart :c:func:`jbd2_journal_stop`, 1937a2208f6SMauro Carvalho Chehabwhich indicates the end of a transaction are nestable calls, so you can 19490f9f118SMauro Carvalho Chehabreenter a transaction if necessary, but remember you must call 1957a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_stop` the same number of times as 1967a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_start` before the transaction is completed (or more 1977a2208f6SMauro Carvalho Chehabaccurately leaves the update phase). Ext4/VFS makes use of this feature to 1987a2208f6SMauro Carvalho Chehabsimplify handling of inode dirtying, quota support, etc. 19990f9f118SMauro Carvalho Chehab 20090f9f118SMauro Carvalho ChehabInside each transaction you need to wrap the modifications to the 20190f9f118SMauro Carvalho Chehabindividual buffers (blocks). Before you start to modify a buffer you 2027a2208f6SMauro Carvalho Chehabneed to call :c:func:`jbd2_journal_get_create_access()` / 2037a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_get_write_access()` / 2047a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_get_undo_access()` as appropriate, this allows the 2057a2208f6SMauro Carvalho Chehabjournalling layer to copy the unmodified 20690f9f118SMauro Carvalho Chehabdata if it needs to. After all the buffer may be part of a previously 20790f9f118SMauro Carvalho Chehabuncommitted transaction. At this point you are at last ready to modify a 20890f9f118SMauro Carvalho Chehabbuffer, and once you are have done so you need to call 2097a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_dirty_metadata`. Or if you've asked for access to a 21090f9f118SMauro Carvalho Chehabbuffer you now know is now longer required to be pushed back on the 2117a2208f6SMauro Carvalho Chehabdevice you can call :c:func:`jbd2_journal_forget` in much the same way as you 2127a2208f6SMauro Carvalho Chehabmight have used :c:func:`bforget` in the past. 21390f9f118SMauro Carvalho Chehab 2147a2208f6SMauro Carvalho ChehabA :c:func:`jbd2_journal_flush` may be called at any time to commit and 21590f9f118SMauro Carvalho Chehabcheckpoint all your transactions. 21690f9f118SMauro Carvalho Chehab 2177a2208f6SMauro Carvalho ChehabThen at umount time , in your :c:func:`put_super` you can then call 2187a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_destroy` to clean up your in-core journal object. 21990f9f118SMauro Carvalho Chehab 22090f9f118SMauro Carvalho ChehabUnfortunately there a couple of ways the journal layer can cause a 22190f9f118SMauro Carvalho Chehabdeadlock. The first thing to note is that each task can only have a 22290f9f118SMauro Carvalho Chehabsingle outstanding transaction at any one time, remember nothing commits 2237a2208f6SMauro Carvalho Chehabuntil the outermost :c:func:`jbd2_journal_stop`. This means you must complete 22490f9f118SMauro Carvalho Chehabthe transaction at the end of each file/inode/address etc. operation you 22590f9f118SMauro Carvalho Chehabperform, so that the journalling system isn't re-entered on another 22690f9f118SMauro Carvalho Chehabjournal. Since transactions can't be nested/batched across differing 22790f9f118SMauro Carvalho Chehabjournals, and another filesystem other than yours (say ext4) may be 22890f9f118SMauro Carvalho Chehabmodified in a later syscall. 22990f9f118SMauro Carvalho Chehab 2307a2208f6SMauro Carvalho ChehabThe second case to bear in mind is that :c:func:`jbd2_journal_start` can block 23190f9f118SMauro Carvalho Chehabif there isn't enough space in the journal for your transaction (based 23290f9f118SMauro Carvalho Chehabon the passed nblocks param) - when it blocks it merely(!) needs to wait 23390f9f118SMauro Carvalho Chehabfor transactions to complete and be committed from other tasks, so 2347a2208f6SMauro Carvalho Chehabessentially we are waiting for :c:func:`jbd2_journal_stop`. So to avoid 2357a2208f6SMauro Carvalho Chehabdeadlocks you must treat :c:func:`jbd2_journal_start` / 2367a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_stop` as if they were semaphores and include them in 2377a2208f6SMauro Carvalho Chehabyour semaphore ordering rules to prevent 2387a2208f6SMauro Carvalho Chehabdeadlocks. Note that :c:func:`jbd2_journal_extend` has similar blocking 2397a2208f6SMauro Carvalho Chehabbehaviour to :c:func:`jbd2_journal_start` so you can deadlock here just as 2407a2208f6SMauro Carvalho Chehabeasily as on :c:func:`jbd2_journal_start`. 24190f9f118SMauro Carvalho Chehab 24290f9f118SMauro Carvalho ChehabTry to reserve the right number of blocks the first time. ;-). This will 24390f9f118SMauro Carvalho Chehabbe the maximum number of blocks you are going to touch in this 24490f9f118SMauro Carvalho Chehabtransaction. I advise having a look at at least ext4_jbd.h to see the 24590f9f118SMauro Carvalho Chehabbasis on which ext4 uses to make these decisions. 24690f9f118SMauro Carvalho Chehab 24790f9f118SMauro Carvalho ChehabAnother wriggle to watch out for is your on-disk block allocation 24890f9f118SMauro Carvalho Chehabstrategy. Why? Because, if you do a delete, you need to ensure you 24990f9f118SMauro Carvalho Chehabhaven't reused any of the freed blocks until the transaction freeing 25090f9f118SMauro Carvalho Chehabthese blocks commits. If you reused these blocks and crash happens, 25190f9f118SMauro Carvalho Chehabthere is no way to restore the contents of the reallocated blocks at the 25290f9f118SMauro Carvalho Chehabend of the last fully committed transaction. One simple way of doing 25390f9f118SMauro Carvalho Chehabthis is to mark blocks as free in internal in-memory block allocation 25490f9f118SMauro Carvalho Chehabstructures only after the transaction freeing them commits. Ext4 uses 25590f9f118SMauro Carvalho Chehabjournal commit callback for this purpose. 25690f9f118SMauro Carvalho Chehab 25790f9f118SMauro Carvalho ChehabWith journal commit callbacks you can ask the journalling layer to call 25890f9f118SMauro Carvalho Chehaba callback function when the transaction is finally committed to disk, 25990f9f118SMauro Carvalho Chehabso that you can do some of your own management. You ask the journalling 26090f9f118SMauro Carvalho Chehablayer for calling the callback by simply setting 2617a2208f6SMauro Carvalho Chehab``journal->j_commit_callback`` function pointer and that function is 26290f9f118SMauro Carvalho Chehabcalled after each transaction commit. You can also use 2637a2208f6SMauro Carvalho Chehab``transaction->t_private_list`` for attaching entries to a transaction 26490f9f118SMauro Carvalho Chehabthat need processing when the transaction commits. 26590f9f118SMauro Carvalho Chehab 26690f9f118SMauro Carvalho ChehabJBD2 also provides a way to block all transaction updates via 2677a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_lock_updates()` / 2687a2208f6SMauro Carvalho Chehab:c:func:`jbd2_journal_unlock_updates()`. Ext4 uses this when it wants a 26990f9f118SMauro Carvalho Chehabwindow with a clean and stable fs for a moment. E.g. 27090f9f118SMauro Carvalho Chehab 27190f9f118SMauro Carvalho Chehab:: 27290f9f118SMauro Carvalho Chehab 27390f9f118SMauro Carvalho Chehab 27490f9f118SMauro Carvalho Chehab jbd2_journal_lock_updates() //stop new stuff happening.. 27590f9f118SMauro Carvalho Chehab jbd2_journal_flush() // checkpoint everything. 27690f9f118SMauro Carvalho Chehab ..do stuff on stable fs 27790f9f118SMauro Carvalho Chehab jbd2_journal_unlock_updates() // carry on with filesystem use. 27890f9f118SMauro Carvalho Chehab 27990f9f118SMauro Carvalho ChehabThe opportunities for abuse and DOS attacks with this should be obvious, 28090f9f118SMauro Carvalho Chehabif you allow unprivileged userspace to trigger codepaths containing 28190f9f118SMauro Carvalho Chehabthese calls. 28290f9f118SMauro Carvalho Chehab 28390f9f118SMauro Carvalho ChehabSummary 28490f9f118SMauro Carvalho Chehab~~~~~~~ 28590f9f118SMauro Carvalho Chehab 28690f9f118SMauro Carvalho ChehabUsing the journal is a matter of wrapping the different context changes, 28790f9f118SMauro Carvalho Chehabbeing each mount, each modification (transaction) and each changed 28890f9f118SMauro Carvalho Chehabbuffer to tell the journalling layer about them. 28990f9f118SMauro Carvalho Chehab 29090f9f118SMauro Carvalho ChehabData Types 29190f9f118SMauro Carvalho Chehab---------- 29290f9f118SMauro Carvalho Chehab 29390f9f118SMauro Carvalho ChehabThe journalling layer uses typedefs to 'hide' the concrete definitions 29490f9f118SMauro Carvalho Chehabof the structures used. As a client of the JBD2 layer you can just rely 29590f9f118SMauro Carvalho Chehabon the using the pointer as a magic cookie of some sort. Obviously the 29690f9f118SMauro Carvalho Chehabhiding is not enforced as this is 'C'. 29790f9f118SMauro Carvalho Chehab 29890f9f118SMauro Carvalho ChehabStructures 29990f9f118SMauro Carvalho Chehab~~~~~~~~~~ 30090f9f118SMauro Carvalho Chehab 30190f9f118SMauro Carvalho Chehab.. kernel-doc:: include/linux/jbd2.h 30290f9f118SMauro Carvalho Chehab :internal: 30390f9f118SMauro Carvalho Chehab 30490f9f118SMauro Carvalho ChehabFunctions 30590f9f118SMauro Carvalho Chehab--------- 30690f9f118SMauro Carvalho Chehab 30790f9f118SMauro Carvalho ChehabThe functions here are split into two groups those that affect a journal 30890f9f118SMauro Carvalho Chehabas a whole, and those which are used to manage transactions 30990f9f118SMauro Carvalho Chehab 31090f9f118SMauro Carvalho ChehabJournal Level 31190f9f118SMauro Carvalho Chehab~~~~~~~~~~~~~ 31290f9f118SMauro Carvalho Chehab 31390f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/jbd2/journal.c 31490f9f118SMauro Carvalho Chehab :export: 31590f9f118SMauro Carvalho Chehab 31690f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/jbd2/recovery.c 31790f9f118SMauro Carvalho Chehab :internal: 31890f9f118SMauro Carvalho Chehab 31990f9f118SMauro Carvalho ChehabTransasction Level 32090f9f118SMauro Carvalho Chehab~~~~~~~~~~~~~~~~~~ 32190f9f118SMauro Carvalho Chehab 32290f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/jbd2/transaction.c 32390f9f118SMauro Carvalho Chehab 32490f9f118SMauro Carvalho ChehabSee also 32590f9f118SMauro Carvalho Chehab-------- 32690f9f118SMauro Carvalho Chehab 32790f9f118SMauro Carvalho Chehab`Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen 32890f9f118SMauro Carvalho ChehabTweedie <http://kernel.org/pub/linux/kernel/people/sct/ext3/journal-design.ps.gz>`__ 32990f9f118SMauro Carvalho Chehab 33090f9f118SMauro Carvalho Chehab`Ext3 Journalling FileSystem, OLS 2000, Dr. Stephen 33190f9f118SMauro Carvalho ChehabTweedie <http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html>`__ 33290f9f118SMauro Carvalho Chehab 33390f9f118SMauro Carvalho Chehabsplice API 33490f9f118SMauro Carvalho Chehab========== 33590f9f118SMauro Carvalho Chehab 33690f9f118SMauro Carvalho Chehabsplice is a method for moving blocks of data around inside the kernel, 33790f9f118SMauro Carvalho Chehabwithout continually transferring them between the kernel and user space. 33890f9f118SMauro Carvalho Chehab 33990f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/splice.c 34090f9f118SMauro Carvalho Chehab 34190f9f118SMauro Carvalho Chehabpipes API 34290f9f118SMauro Carvalho Chehab========= 34390f9f118SMauro Carvalho Chehab 34490f9f118SMauro Carvalho ChehabPipe interfaces are all for in-kernel (builtin image) use. They are not 34590f9f118SMauro Carvalho Chehabexported for use by modules. 34690f9f118SMauro Carvalho Chehab 34790f9f118SMauro Carvalho Chehab.. kernel-doc:: include/linux/pipe_fs_i.h 34890f9f118SMauro Carvalho Chehab :internal: 34990f9f118SMauro Carvalho Chehab 35090f9f118SMauro Carvalho Chehab.. kernel-doc:: fs/pipe.c 351f4f864c1SEric Biggers 352f4f864c1SEric BiggersEncryption API 353f4f864c1SEric Biggers============== 354f4f864c1SEric Biggers 355f4f864c1SEric BiggersA library which filesystems can hook into to support transparent 356f4f864c1SEric Biggersencryption of files and directories. 357f4f864c1SEric Biggers 358f4f864c1SEric Biggers.. toctree:: 359f4f864c1SEric Biggers :maxdepth: 2 360f4f864c1SEric Biggers 361f4f864c1SEric Biggers fscrypt 3627bbfd9adSNeilBrown 3637bbfd9adSNeilBrownPathname lookup 3647bbfd9adSNeilBrown=============== 3657bbfd9adSNeilBrown 366942104a2SNeilBrown 367942104a2SNeilBrownThis write-up is based on three articles published at lwn.net: 368942104a2SNeilBrown 369942104a2SNeilBrown- <https://lwn.net/Articles/649115/> Pathname lookup in Linux 370942104a2SNeilBrown- <https://lwn.net/Articles/649729/> RCU-walk: faster pathname lookup in Linux 371942104a2SNeilBrown- <https://lwn.net/Articles/650786/> A walk among the symlinks 372942104a2SNeilBrown 373942104a2SNeilBrownWritten by Neil Brown with help from Al Viro and Jon Corbet. 374942104a2SNeilBrownIt has subsequently been updated to reflect changes in the kernel 375942104a2SNeilBrownincluding: 376942104a2SNeilBrown 377942104a2SNeilBrown- per-directory parallel name lookup. 3787bbfd9adSNeilBrown 3797bbfd9adSNeilBrown.. toctree:: 3807bbfd9adSNeilBrown :maxdepth: 2 3817bbfd9adSNeilBrown 3827bbfd9adSNeilBrown path-lookup.rst 38335283f56SChristian Brauner 38435283f56SChristian Braunerbinderfs 38535283f56SChristian Brauner======== 38635283f56SChristian Brauner 38735283f56SChristian Brauner.. toctree:: 38835283f56SChristian Brauner 38935283f56SChristian Brauner binderfs.rst 390