sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/filesystems/buffermodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/filesystems/buffermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/filesystems/buffermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/filesystems/buffermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/filesystems/buffermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/pt_BR/filesystems/buffermodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/filesystems/buffermodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h Buffer Headsh]h Buffer Heads}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/filesystems/buffer.rsthKubh paragraph)}(hLinux uses buffer heads to maintain state about individual filesystem blocks. Buffer heads are deprecated and new filesystems should use iomap instead.h]hLinux uses buffer heads to maintain state about individual filesystem blocks. Buffer heads are deprecated and new filesystems should use iomap instead.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h Functionsh]h Functions}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlebrelse (C function)c.brelsehNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(h$void brelse (struct buffer_head *bh)h]hdesc_signature_line)}(h#void brelse(struct buffer_head *bh)h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhj hhh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhM2ubhdesc_sig_space)}(h h]h }(hj"hhhNhNubah}(h]h ]wah"]h$]h&]uh1j hj hhhjhM2ubh desc_name)}(hbrelseh]h desc_sig_name)}(hbrelseh]hbrelse}(hj9hhhNhNubah}(h]h ]nah"]h$]h&]uh1j7hj3ubah}(h]h ](sig-namedescnameeh"]h$]h&] xml:spacepreserveuh1j1hj hhhjhM2ubhdesc_parameterlist)}(h(struct buffer_head *bh)h]hdesc_parameter)}(hstruct buffer_head *bhh](hdesc_sig_keyword)}(hstructh]hstruct}(hj`hhhNhNubah}(h]h ]kah"]h$]h&]uh1j^hjZubj!)}(h h]h }(hjohhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjZubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj}ubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jj;sbc.brelseasbuh1hhjZubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjZubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjZubj8)}(hbhh]hbh}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjZubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjTubah}(h]h ]h"]h$]h&]jPjQuh1jRhj hhhjhM2ubeh}(h]h ]h"]h$]h&]jPjQ add_permalinkuh1jsphinx_line_type declaratorhjhhhjhM2ubah}(h]hah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhM2hhhhubh desc_content)}(hhh]h)}(hRelease a buffer.h]hRelease a buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhM2hjhhubah}(h]h ]h"]h$]h&]uh1jhhhhhjhM2ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1hhhhhhNhNubh container)}(hX%**Parameters** ``struct buffer_head *bh`` The buffer to release. **Description** Decrement a buffer_head's reference count. If **bh** is NULL, this function is a no-op. If all buffers on a folio have zero reference count, are clean and unlocked, and if the folio is unlocked and not under writeback then try_to_free_buffers() may strip the buffers from the folio in preparation for freeing it (sometimes, rarely, buffers are removed from a folio but it ends up not being freed, and buffers may later be reattached). **Context** Any context.h](h)}(h**Parameters**h]hstrong)}(hj&h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj$ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhM6hj ubhdefinition_list)}(hhh]hdefinition_list_item)}(h2``struct buffer_head *bh`` The buffer to release. h](hterm)}(h``struct buffer_head *bh``h]hliteral)}(hjMh]hstruct buffer_head *bh}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjKubah}(h]h ]h"]h$]h&]uh1jIh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhM3hjEubh definition)}(hhh]h)}(hThe buffer to release.h]hThe buffer to release.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhM3hjgubah}(h]h ]h"]h$]h&]uh1jehjEubeh}(h]h ]h"]h$]h&]uh1jChjdhM3hj@ubah}(h]h ]h"]h$]h&]uh1j>hj ubh)}(h**Description**h]j))}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhM5hj ubh)}(hXDecrement a buffer_head's reference count. If **bh** is NULL, this function is a no-op.h](h1Decrement a buffer_head’s reference count. If }(hjhhhNhNubj))}(h**bh**h]hbh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh# is NULL, this function is a no-op.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhM4hj ubh)}(hXZIf all buffers on a folio have zero reference count, are clean and unlocked, and if the folio is unlocked and not under writeback then try_to_free_buffers() may strip the buffers from the folio in preparation for freeing it (sometimes, rarely, buffers are removed from a folio but it ends up not being freed, and buffers may later be reattached).h]hXZIf all buffers on a folio have zero reference count, are clean and unlocked, and if the folio is unlocked and not under writeback then try_to_free_buffers() may strip the buffers from the folio in preparation for freeing it (sometimes, rarely, buffers are removed from a folio but it ends up not being freed, and buffers may later be reattached).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhM7hj ubh)}(h **Context**h]j))}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhM>hj ubh)}(h Any context.h]h Any context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhM?hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hbforget (C function) c.bforgethNtauh1hhhhhhNhNubh)}(hhh](j)}(h%void bforget (struct buffer_head *bh)h]j )}(h$void bforget(struct buffer_head *bh)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMHubj!)}(h h]h }(hj(hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhj'hMHubj2)}(hbforgeth]j8)}(hbforgeth]hbforget}(hj:hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj6ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hjhhhj'hMHubjS)}(h(struct buffer_head *bh)h]jY)}(hstruct buffer_head *bhh](j_)}(hjbh]hstruct}(hjVhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjRubj!)}(h h]h }(hjchhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjRubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hjthhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjqubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjvmodnameN classnameNjj)}j]j)}jj<sb c.bforgetasbuh1hhjRubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjRubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubj8)}(hbhh]hbh}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjRubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjNubah}(h]h ]h"]h$]h&]jPjQuh1jRhjhhhj'hMHubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhjhhhj'hMHubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj'hMHhjhhubj)}(hhh]h)}(h#Discard any dirty data in a buffer.h]h#Discard any dirty data in a buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMHhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj'hMHubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1hhhhhhNhNubj)}(hX.**Parameters** ``struct buffer_head *bh`` The buffer to forget. **Description** Call this function instead of brelse() if the data written to a buffer no longer needs to be written back. It will clear the buffer's dirty flag so writeback of this buffer will be skipped. **Context** Any context.h](h)}(h**Parameters**h]j))}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMLhjubj?)}(hhh]jD)}(h1``struct buffer_head *bh`` The buffer to forget. h](jJ)}(h``struct buffer_head *bh``h]jP)}(hjh]hstruct buffer_head *bh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMIhjubjf)}(hhh]h)}(hThe buffer to forget.h]hThe buffer to forget.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMIhj0ubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChj/hMIhjubah}(h]h ]h"]h$]h&]uh1j>hjubh)}(h**Description**h]j))}(hjUh]h Description}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjSubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMKhjubh)}(hCall this function instead of brelse() if the data written to a buffer no longer needs to be written back. It will clear the buffer's dirty flag so writeback of this buffer will be skipped.h]hCall this function instead of brelse() if the data written to a buffer no longer needs to be written back. It will clear the buffer’s dirty flag so writeback of this buffer will be skipped.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMJhjubh)}(h **Context**h]j))}(hj|h]hContext}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjzubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMNhjubh)}(h Any context.h]h Any context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMOhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h__bread (C function) c.__breadhNtauh1hhhhhhNhNubh)}(hhh](j)}(hWstruct buffer_head * __bread (struct block_device *bdev, sector_t block, unsigned size)h]j )}(hUstruct buffer_head *__bread(struct block_device *bdev, sector_t block, unsigned size)h](j_)}(hjbh]hstruct}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjhhh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhjhMubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}j__breadsb c.__breadasbuh1hhjhhhjhMubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhjhMubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj2)}(h__breadh]j8)}(hjh]h__bread}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hjhhhjhMubjS)}(h:(struct block_device *bdev, sector_t block, unsigned size)h](jY)}(hstruct block_device *bdevh](j_)}(hjbh]hstruct}(hj;hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj7ubj!)}(h h]h }(hjHhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj7ubh)}(hhh]j8)}(h block_deviceh]h block_device}(hjYhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjVubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj[modnameN classnameNjj)}j]j c.__breadasbuh1hhj7ubj!)}(h h]h }(hjwhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj7ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj8)}(hbdevh]hbdev}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj7ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj3ubjY)}(hsector_t blockh](h)}(hhh]j8)}(hsector_th]hsector_t}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.__breadasbuh1hhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj8)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj3ubjY)}(h unsigned sizeh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj8)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj3ubeh}(h]h ]h"]h$]h&]jPjQuh1jRhjhhhjhMubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(h Read a block.h]h Read a block.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhj6hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjQjjQjjjuh1hhhhhhNhNubj)}(hX=**Parameters** ``struct block_device *bdev`` The block device to read from. ``sector_t block`` Block number in units of block size. ``unsigned size`` The block size of this device in bytes. **Description** Read a specified block, and return the buffer head that refers to it. The memory is allocated from the movable area so that it can be migrated. The returned buffer head has its refcount increased. The caller should call brelse() when it has finished with the buffer. **Context** May sleep waiting for I/O. **Return** NULL if the block was unreadable.h](h)}(h**Parameters**h]j))}(hj[h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjYubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjUubj?)}(hhh](jD)}(h=``struct block_device *bdev`` The block device to read from. h](jJ)}(h``struct block_device *bdev``h]jP)}(hjzh]hstruct block_device *bdev}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjxubah}(h]h ]h"]h$]h&]uh1jIh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjtubjf)}(hhh]h)}(hThe block device to read from.h]hThe block device to read from.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjtubeh}(h]h ]h"]h$]h&]uh1jChjhMhjqubjD)}(h8``sector_t block`` Block number in units of block size. h](jJ)}(h``sector_t block``h]jP)}(hjh]hsector_t block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjubjf)}(hhh]h)}(h$Block number in units of block size.h]h$Block number in units of block size.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhMhjqubjD)}(h:``unsigned size`` The block size of this device in bytes. h](jJ)}(h``unsigned size``h]jP)}(hjh]h unsigned size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjubjf)}(hhh]h)}(h'The block size of this device in bytes.h]h'The block size of this device in bytes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhMhjqubeh}(h]h ]h"]h$]h&]uh1j>hjUubh)}(h**Description**h]j))}(hj'h]h Description}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj%ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjUubh)}(hX Read a specified block, and return the buffer head that refers to it. The memory is allocated from the movable area so that it can be migrated. The returned buffer head has its refcount increased. The caller should call brelse() when it has finished with the buffer.h]hX Read a specified block, and return the buffer head that refers to it. The memory is allocated from the movable area so that it can be migrated. The returned buffer head has its refcount increased. The caller should call brelse() when it has finished with the buffer.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjUubh)}(h **Context**h]j))}(hjNh]hContext}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjLubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjUubh)}(hMay sleep waiting for I/O.h]hMay sleep waiting for I/O.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjUubh)}(h **Return**h]j))}(hjuh]hReturn}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjsubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjUubh)}(h!NULL if the block was unreadable.h]h!NULL if the block was unreadable.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hget_nth_bh (C function) c.get_nth_bhhNtauh1hhhhhhNhNubh)}(hhh](j)}(hLstruct buffer_head * get_nth_bh (struct buffer_head *bh, unsigned int count)h]j )}(hJstruct buffer_head *get_nth_bh(struct buffer_head *bh, unsigned int count)h](j_)}(hjbh]hstruct}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjhhh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhjhMubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}j get_nth_bhsb c.get_nth_bhasbuh1hhjhhhjhMubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhjhMubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj2)}(h get_nth_bhh]j8)}(hjh]h get_nth_bh}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hjhhhjhMubjS)}(h,(struct buffer_head *bh, unsigned int count)h](jY)}(hstruct buffer_head *bhh](j_)}(hjbh]hstruct}(hj4hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj0ubj!)}(h h]h }(hjAhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj0ubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hjRhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjOubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjTmodnameN classnameNjj)}j]j c.get_nth_bhasbuh1hhj0ubj!)}(h h]h }(hjphhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj0ubj)}(hjh]h*}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj8)}(hbhh]hbh}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj0ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj,ubjY)}(hunsigned int counth](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj8)}(hcounth]hcount}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj,ubeh}(h]h ]h"]h$]h&]jPjQuh1jRhjhhhjhMubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjhhubj)}(hhh]h)}(h2Get a reference on the n'th buffer after this one.h]h4Get a reference on the n’th buffer after this one.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhj hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct buffer_head *bh`` The buffer to start counting from. ``unsigned int count`` How many buffers to skip. **Description** This is primarily useful for finding the nth buffer in a folio; in that case you pass the head buffer and the byte offset in the folio divided by the block size. It can be used for other purposes, but it will wrap at the end of the folio rather than returning NULL or proceeding to the next folio for you. **Return** The requested buffer with an elevated refcount.h](h)}(h**Parameters**h]j))}(hj( h]h Parameters}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj& ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhj" ubj?)}(hhh](jD)}(h>``struct buffer_head *bh`` The buffer to start counting from. h](jJ)}(h``struct buffer_head *bh``h]jP)}(hjG h]hstruct buffer_head *bh}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjE ubah}(h]h ]h"]h$]h&]uh1jIh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjA ubjf)}(hhh]h)}(h"The buffer to start counting from.h]h"The buffer to start counting from.}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\ hMhj] ubah}(h]h ]h"]h$]h&]uh1jehjA ubeh}(h]h ]h"]h$]h&]uh1jChj\ hMhj> ubjD)}(h1``unsigned int count`` How many buffers to skip. h](jJ)}(h``unsigned int count``h]jP)}(hj h]hunsigned int count}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj~ ubah}(h]h ]h"]h$]h&]uh1jIh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhjz ubjf)}(hhh]h)}(hHow many buffers to skip.h]hHow many buffers to skip.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jehjz ubeh}(h]h ]h"]h$]h&]uh1jChj hMhj> ubeh}(h]h ]h"]h$]h&]uh1j>hj" ubh)}(h**Description**h]j))}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhj" ubh)}(hX2This is primarily useful for finding the nth buffer in a folio; in that case you pass the head buffer and the byte offset in the folio divided by the block size. It can be used for other purposes, but it will wrap at the end of the folio rather than returning NULL or proceeding to the next folio for you.h]hX2This is primarily useful for finding the nth buffer in a folio; in that case you pass the head buffer and the byte offset in the folio divided by the block size. It can be used for other purposes, but it will wrap at the end of the folio rather than returning NULL or proceeding to the next folio for you.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhj" ubh)}(h **Return**h]j))}(hj h]hReturn}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhj" ubh)}(h/The requested buffer with an elevated refcount.h]h/The requested buffer with an elevated refcount.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:10: ./include/linux/buffer_head.hhMhj" ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hmmb_sync (C function) c.mmb_synchNtauh1hhhhhhNhNubh)}(hhh](j)}(h/int mmb_sync (struct mapping_metadata_bhs *mmb)h]j )}(h.int mmb_sync(struct mapping_metadata_bhs *mmb)h](j)}(hinth]hint}(hj' hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj# hhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMubj!)}(h h]h }(hj6 hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj# hhhj5 hMubj2)}(hmmb_synch]j8)}(hmmb_synch]hmmb_sync}(hjH hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjD ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hj# hhhj5 hMubjS)}(h"(struct mapping_metadata_bhs *mmb)h]jY)}(h struct mapping_metadata_bhs *mmbh](j_)}(hjbh]hstruct}(hjd hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj` ubj!)}(h h]h }(hjq hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj` ubh)}(hhh]j8)}(hmapping_metadata_bhsh]hmapping_metadata_bhs}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jjJ sb c.mmb_syncasbuh1hhj` ubj!)}(h h]h }(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj` ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj` ubj8)}(hmmbh]hmmb}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj` ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj\ ubah}(h]h ]h"]h$]h&]jPjQuh1jRhj# hhhj5 hMubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhj hhhj5 hMubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj5 hMhj hhubj)}(hhh]h)}(h+write out & wait upon all buffers in a listh]h+write out & wait upon all buffers in a list}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj5 hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct mapping_metadata_bhs *mmb`` the list of buffers to write **Description** Starts I/O against the buffers in the given list and waits upon that I/O. Basically, this is a convenience function for fsync(). **mmb** is for a file or directory which needs those buffers to be written for a successful fsync(). We have conflicting pressures: we want to make sure that all initially dirty buffers get waited on, but that any subsequently dirtied buffers don't. After all, we don't want fsync to last forever if somebody is actively writing to the file. Do this in two main stages: first we copy dirty buffers to a temporary inode list, queueing the writes as we go. Then we clean up, waiting for those writes to complete. mark_buffer_dirty_inode() doesn't touch b_assoc_buffers list if b_mmb is not NULL so we are sure the buffer stays on our list until IO completes (at which point it can be reaped).h](h)}(h**Parameters**h]j))}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj ubj?)}(hhh]jD)}(hB``struct mapping_metadata_bhs *mmb`` the list of buffers to write h](jJ)}(h$``struct mapping_metadata_bhs *mmb``h]jP)}(hj( h]h struct mapping_metadata_bhs *mmb}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj& ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj" ubjf)}(hhh]h)}(hthe list of buffers to writeh]hthe list of buffers to write}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj= hMhj> ubah}(h]h ]h"]h$]h&]uh1jehj" ubeh}(h]h ]h"]h$]h&]uh1jChj= hMhj ubah}(h]h ]h"]h$]h&]uh1j>hj ubh)}(h**Description**h]j))}(hjc h]h Description}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hja ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj ubh)}(hStarts I/O against the buffers in the given list and waits upon that I/O. Basically, this is a convenience function for fsync(). **mmb** is for a file or directory which needs those buffers to be written for a successful fsync().h](hStarts I/O against the buffers in the given list and waits upon that I/O. Basically, this is a convenience function for fsync(). }(hjy hhhNhNubj))}(h**mmb**h]hmmb}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjy ubh] is for a file or directory which needs those buffers to be written for a successful fsync().}(hjy hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj ubh)}(hWe have conflicting pressures: we want to make sure that all initially dirty buffers get waited on, but that any subsequently dirtied buffers don't. After all, we don't want fsync to last forever if somebody is actively writing to the file.h]hWe have conflicting pressures: we want to make sure that all initially dirty buffers get waited on, but that any subsequently dirtied buffers don’t. After all, we don’t want fsync to last forever if somebody is actively writing to the file.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj ubh)}(hX\Do this in two main stages: first we copy dirty buffers to a temporary inode list, queueing the writes as we go. Then we clean up, waiting for those writes to complete. mark_buffer_dirty_inode() doesn't touch b_assoc_buffers list if b_mmb is not NULL so we are sure the buffer stays on our list until IO completes (at which point it can be reaped).h]hX^Do this in two main stages: first we copy dirty buffers to a temporary inode list, queueing the writes as we go. Then we clean up, waiting for those writes to complete. mark_buffer_dirty_inode() doesn’t touch b_assoc_buffers list if b_mmb is not NULL so we are sure the buffer stays on our list until IO completes (at which point it can be reaped).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hmmb_fsync_noflush (C function)c.mmb_fsync_noflushhNtauh1hhhhhhNhNubh)}(hhh](j)}(htint mmb_fsync_noflush (struct file *file, struct mapping_metadata_bhs *mmb, loff_t start, loff_t end, bool datasync)h]j )}(hsint mmb_fsync_noflush(struct file *file, struct mapping_metadata_bhs *mmb, loff_t start, loff_t end, bool datasync)h](j)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMqubj!)}(h h]h }(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj hhhj hMqubj2)}(hmmb_fsync_noflushh]j8)}(hmmb_fsync_noflushh]hmmb_fsync_noflush}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hj hhhj hMqubjS)}(h^(struct file *file, struct mapping_metadata_bhs *mmb, loff_t start, loff_t end, bool datasync)h](jY)}(hstruct file *fileh](j_)}(hjbh]hstruct}(hj hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj ubj!)}(h h]h }(hj" hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj ubh)}(hhh]j8)}(hfileh]hfile}(hj3 hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj0 ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj5 modnameN classnameNjj)}j]j)}jj sbc.mmb_fsync_noflushasbuh1hhj ubj!)}(h h]h }(hjS hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj ubj)}(hjh]h*}(hja hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj8)}(hfileh]hfile}(hjn hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj ubjY)}(h struct mapping_metadata_bhs *mmbh](j_)}(hjbh]hstruct}(hj hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj ubj!)}(h h]h }(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj ubh)}(hhh]j8)}(hmapping_metadata_bhsh]hmapping_metadata_bhs}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]jO c.mmb_fsync_noflushasbuh1hhj ubj!)}(h h]h }(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj8)}(hmmbh]hmmb}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj ubjY)}(h loff_t starth](h)}(hhh]j8)}(hloff_th]hloff_t}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]jO c.mmb_fsync_noflushasbuh1hhj ubj!)}(h h]h }(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj ubj8)}(hstarth]hstart}(hj& hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj ubjY)}(h loff_t endh](h)}(hhh]j8)}(hloff_th]hloff_t}(hjB hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj? ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjD modnameN classnameNjj)}j]jO c.mmb_fsync_noflushasbuh1hhj; ubj!)}(h h]h }(hj` hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj; ubj8)}(hendh]hend}(hjn hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj; ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj ubjY)}(h bool datasynch](j)}(hboolh]hbool}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj!)}(h h]h }(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj ubj8)}(hdatasynch]hdatasync}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj ubeh}(h]h ]h"]h$]h&]jPjQuh1jRhj hhhj hMqubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhj hhhj hMqubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj hMqhj hhubj)}(hhh]h)}(hFfsync implementation for simple filesystems with metadata buffers listh]hFfsync implementation for simple filesystems with metadata buffers list}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMqhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMqubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct file *file`` file to synchronize ``struct mapping_metadata_bhs *mmb`` list of metadata bhs to flush ``loff_t start`` start offset in bytes ``loff_t end`` end offset in bytes (inclusive) ``bool datasync`` only synchronize essential metadata if true **Description** This is an implementation of the fsync method for simple filesystems which track all non-inode metadata in the buffers list hanging off the **mmb** structure.h](h)}(h**Parameters**h]j))}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMuhj ubj?)}(hhh](jD)}(h*``struct file *file`` file to synchronize h](jJ)}(h``struct file *file``h]jP)}(hjh]hstruct file *file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMthjubjf)}(hhh]h)}(hfile to synchronizeh]hfile to synchronize}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMthj$ubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChj#hMthjubjD)}(hC``struct mapping_metadata_bhs *mmb`` list of metadata bhs to flush h](jJ)}(h$``struct mapping_metadata_bhs *mmb``h]jP)}(hjGh]h struct mapping_metadata_bhs *mmb}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjEubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMuhjAubjf)}(hhh]h)}(hlist of metadata bhs to flushh]hlist of metadata bhs to flush}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hMuhj]ubah}(h]h ]h"]h$]h&]uh1jehjAubeh}(h]h ]h"]h$]h&]uh1jChj\hMuhjubjD)}(h'``loff_t start`` start offset in bytes h](jJ)}(h``loff_t start``h]jP)}(hjh]h loff_t start}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj~ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMvhjzubjf)}(hhh]h)}(hstart offset in bytesh]hstart offset in bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMvhjubah}(h]h ]h"]h$]h&]uh1jehjzubeh}(h]h ]h"]h$]h&]uh1jChjhMvhjubjD)}(h/``loff_t end`` end offset in bytes (inclusive) h](jJ)}(h``loff_t end``h]jP)}(hjh]h loff_t end}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMwhjubjf)}(hhh]h)}(hend offset in bytes (inclusive)h]hend offset in bytes (inclusive)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMwhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhMwhjubjD)}(h>``bool datasync`` only synchronize essential metadata if true h](jJ)}(h``bool datasync``h]jP)}(hjh]h bool datasync}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMxhjubjf)}(hhh]h)}(h+only synchronize essential metadata if trueh]h+only synchronize essential metadata if true}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMxhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhMxhjubeh}(h]h ]h"]h$]h&]uh1j>hj ubh)}(h**Description**h]j))}(hj-h]h Description}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj+ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMzhj ubh)}(hThis is an implementation of the fsync method for simple filesystems which track all non-inode metadata in the buffers list hanging off the **mmb** structure.h](hThis is an implementation of the fsync method for simple filesystems which track all non-inode metadata in the buffers list hanging off the }(hjChhhNhNubj))}(h**mmb**h]hmmb}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjCubh structure.}(hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMyhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hmmb_fsync (C function) c.mmb_fsynchNtauh1hhhhhhNhNubh)}(hhh](j)}(hlint mmb_fsync (struct file *file, struct mapping_metadata_bhs *mmb, loff_t start, loff_t end, bool datasync)h]j )}(hkint mmb_fsync(struct file *file, struct mapping_metadata_bhs *mmb, loff_t start, loff_t end, bool datasync)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhjhMubj2)}(h mmb_fsynch]j8)}(h mmb_fsynch]h mmb_fsync}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hjhhhjhMubjS)}(h^(struct file *file, struct mapping_metadata_bhs *mmb, loff_t start, loff_t end, bool datasync)h](jY)}(hstruct file *fileh](j_)}(hjbh]hstruct}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubh)}(hhh]j8)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsb c.mmb_fsyncasbuh1hhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj8)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjubjY)}(h struct mapping_metadata_bhs *mmbh](j_)}(hjbh]hstruct}(hj3hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj/ubj!)}(h h]h }(hj@hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj/ubh)}(hhh]j8)}(hmapping_metadata_bhsh]hmapping_metadata_bhs}(hjQhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjNubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjSmodnameN classnameNjj)}j]j c.mmb_fsyncasbuh1hhj/ubj!)}(h h]h }(hjohhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj/ubj)}(hjh]h*}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj8)}(hmmbh]hmmb}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj/ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjubjY)}(h loff_t starth](h)}(hhh]j8)}(hloff_th]hloff_t}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.mmb_fsyncasbuh1hhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj8)}(hstarth]hstart}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjubjY)}(h loff_t endh](h)}(hhh]j8)}(hloff_th]hloff_t}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.mmb_fsyncasbuh1hhjubj!)}(h h]h }(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj8)}(hendh]hend}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjubjY)}(h bool datasynch](j)}(hj h]hbool}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj!)}(h h]h }(hj@hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj/ubj8)}(hdatasynch]hdatasync}(hjNhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj/ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjubeh}(h]h ]h"]h$]h&]jPjQuh1jRhjhhhjhMubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhj|hhhjhMubah}(h]jwah ](jjeh"]h$]h&]jj)jhuh1jhjhMhjyhhubj)}(hhh]h)}(hFfsync implementation for simple filesystems with metadata buffers listh]hFfsync implementation for simple filesystems with metadata buffers list}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjuhhubah}(h]h ]h"]h$]h&]uh1jhjyhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct file *file`` file to synchronize ``struct mapping_metadata_bhs *mmb`` list of metadata bhs to flush ``loff_t start`` start offset in bytes ``loff_t end`` end offset in bytes (inclusive) ``bool datasync`` only synchronize essential metadata if true **Description** This is an implementation of the fsync method for simple filesystems which track all non-inode metadata in the buffers list hanging off the **mmb** structure. This also makes sure that a device cache flush operation is called at the end.h](h)}(h**Parameters**h]j))}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjubj?)}(hhh](jD)}(h*``struct file *file`` file to synchronize h](jJ)}(h``struct file *file``h]jP)}(hjh]hstruct file *file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjubjf)}(hhh]h)}(hfile to synchronizeh]hfile to synchronize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhMhjubjD)}(hC``struct mapping_metadata_bhs *mmb`` list of metadata bhs to flush h](jJ)}(h$``struct mapping_metadata_bhs *mmb``h]jP)}(hjh]h struct mapping_metadata_bhs *mmb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjubjf)}(hhh]h)}(hlist of metadata bhs to flushh]hlist of metadata bhs to flush}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhMhjubjD)}(h'``loff_t start`` start offset in bytes h](jJ)}(h``loff_t start``h]jP)}(hj+h]h loff_t start}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj)ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj%ubjf)}(hhh]h)}(hstart offset in bytesh]hstart offset in bytes}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhjAubah}(h]h ]h"]h$]h&]uh1jehj%ubeh}(h]h ]h"]h$]h&]uh1jChj@hMhjubjD)}(h/``loff_t end`` end offset in bytes (inclusive) h](jJ)}(h``loff_t end``h]jP)}(hjdh]h loff_t end}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjbubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj^ubjf)}(hhh]h)}(hend offset in bytes (inclusive)h]hend offset in bytes (inclusive)}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhMhjzubah}(h]h ]h"]h$]h&]uh1jehj^ubeh}(h]h ]h"]h$]h&]uh1jChjyhMhjubjD)}(h>``bool datasync`` only synchronize essential metadata if true h](jJ)}(h``bool datasync``h]jP)}(hjh]h bool datasync}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjubjf)}(hhh]h)}(h+only synchronize essential metadata if trueh]h+only synchronize essential metadata if true}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhMhjubeh}(h]h ]h"]h$]h&]uh1j>hjubh)}(h**Description**h]j))}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjubh)}(hThis is an implementation of the fsync method for simple filesystems which track all non-inode metadata in the buffers list hanging off the **mmb** structure. This also makes sure that a device cache flush operation is called at the end.h](hThis is an implementation of the fsync method for simple filesystems which track all non-inode metadata in the buffers list hanging off the }(hjhhhNhNubj))}(h**mmb**h]hmmb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubhZ structure. This also makes sure that a device cache flush operation is called at the end.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hblock_dirty_folio (C function)c.block_dirty_foliohNtauh1hhhhhhNhNubh)}(hhh](j)}(hKbool block_dirty_folio (struct address_space *mapping, struct folio *folio)h]j )}(hJbool block_dirty_folio(struct address_space *mapping, struct folio *folio)h](j)}(hj h]hbool}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMubj!)}(h h]h }(hj=hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj+hhhj<hMubj2)}(hblock_dirty_folioh]j8)}(hblock_dirty_folioh]hblock_dirty_folio}(hjOhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjKubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hj+hhhj<hMubjS)}(h4(struct address_space *mapping, struct folio *folio)h](jY)}(hstruct address_space *mappingh](j_)}(hjbh]hstruct}(hjkhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjgubj!)}(h h]h }(hjxhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjgubh)}(hhh]j8)}(h address_spaceh]h address_space}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjQsbc.block_dirty_folioasbuh1hhjgubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjgubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubj8)}(hmappingh]hmapping}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjgubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjcubjY)}(hstruct folio *folioh](j_)}(hjbh]hstruct}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubh)}(hhh]j8)}(hfolioh]hfolio}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.block_dirty_folioasbuh1hhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj)}(hjh]h*}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj8)}(hfolioh]hfolio}(hj4hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjcubeh}(h]h ]h"]h$]h&]jPjQuh1jRhj+hhhj<hMubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhj'hhhj<hMubah}(h]j"ah ](jjeh"]h$]h&]jj)jhuh1jhj<hMhj$hhubj)}(hhh]h)}(hMark a folio as dirty.h]hMark a folio as dirty.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj[hhubah}(h]h ]h"]h$]h&]uh1jhj$hhhj<hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjvjjvjjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct address_space *mapping`` The address space containing this folio. ``struct folio *folio`` The folio to mark dirty. **Description** Filesystems which use buffer_heads can use this function as their ->dirty_folio implementation. Some filesystems need to do a little work before calling this function. Filesystems which do not use buffer_heads should call filemap_dirty_folio() instead. If the folio has buffers, the uptodate buffers are set dirty, to preserve dirty-state coherency between the folio and the buffers. Buffers added to a dirty folio are created dirty. The buffers are dirtied before the folio is dirtied. There's a small race window in which writeback may see the folio cleanness but not the buffer dirtiness. That's fine. If this code were to set the folio dirty before the buffers, writeback could clear the folio dirty flag, see a bunch of clean buffers and we'd end up with dirty buffers/clean folio on the dirty folio list. We use i_private_lock to lock against try_to_free_buffers() while using the folio's buffer list. This also prevents clean buffers being added to the folio after it was set dirty. **Context** May only be called from process context. Does not sleep. Caller must ensure that **folio** cannot be truncated during this call, typically by holding the folio lock or having a page in the folio mapped and holding the page table lock. **Return** True if the folio was dirtied; false if it was already dirtied.h](h)}(h**Parameters**h]j))}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj~ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubj?)}(hhh](jD)}(hK``struct address_space *mapping`` The address space containing this folio. h](jJ)}(h!``struct address_space *mapping``h]jP)}(hjh]hstruct address_space *mapping}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjubjf)}(hhh]h)}(h(The address space containing this folio.h]h(The address space containing this folio.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhMhjubjD)}(h1``struct folio *folio`` The folio to mark dirty. h](jJ)}(h``struct folio *folio``h]jP)}(hjh]hstruct folio *folio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjubjf)}(hhh]h)}(hThe folio to mark dirty.h]hThe folio to mark dirty.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhMhjubeh}(h]h ]h"]h$]h&]uh1j>hjzubh)}(h**Description**h]j))}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubh)}(hFilesystems which use buffer_heads can use this function as their ->dirty_folio implementation. Some filesystems need to do a little work before calling this function. Filesystems which do not use buffer_heads should call filemap_dirty_folio() instead.h]hFilesystems which use buffer_heads can use this function as their ->dirty_folio implementation. Some filesystems need to do a little work before calling this function. Filesystems which do not use buffer_heads should call filemap_dirty_folio() instead.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubh)}(hIf the folio has buffers, the uptodate buffers are set dirty, to preserve dirty-state coherency between the folio and the buffers. Buffers added to a dirty folio are created dirty.h]hIf the folio has buffers, the uptodate buffers are set dirty, to preserve dirty-state coherency between the folio and the buffers. Buffers added to a dirty folio are created dirty.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubh)}(hX{The buffers are dirtied before the folio is dirtied. There's a small race window in which writeback may see the folio cleanness but not the buffer dirtiness. That's fine. If this code were to set the folio dirty before the buffers, writeback could clear the folio dirty flag, see a bunch of clean buffers and we'd end up with dirty buffers/clean folio on the dirty folio list.h]hXThe buffers are dirtied before the folio is dirtied. There’s a small race window in which writeback may see the folio cleanness but not the buffer dirtiness. That’s fine. If this code were to set the folio dirty before the buffers, writeback could clear the folio dirty flag, see a bunch of clean buffers and we’d end up with dirty buffers/clean folio on the dirty folio list.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubh)}(hWe use i_private_lock to lock against try_to_free_buffers() while using the folio's buffer list. This also prevents clean buffers being added to the folio after it was set dirty.h]hWe use i_private_lock to lock against try_to_free_buffers() while using the folio’s buffer list. This also prevents clean buffers being added to the folio after it was set dirty.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubh)}(h **Context**h]j))}(hjgh]hContext}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjeubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubh)}(hMay only be called from process context. Does not sleep. Caller must ensure that **folio** cannot be truncated during this call, typically by holding the folio lock or having a page in the folio mapped and holding the page table lock.h](hRMay only be called from process context. Does not sleep. Caller must ensure that }(hj}hhhNhNubj))}(h **folio**h]hfolio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj}ubh cannot be truncated during this call, typically by holding the folio lock or having a page in the folio mapped and holding the page table lock.}(hj}hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubh)}(h **Return**h]j))}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubh)}(h?True if the folio was dirtied; false if it was already dirtied.h]h?True if the folio was dirtied; false if it was already dirtied.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjzubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hmark_buffer_dirty (C function)c.mark_buffer_dirtyhNtauh1hhhhhhNhNubh)}(hhh](j)}(h/void mark_buffer_dirty (struct buffer_head *bh)h]j )}(h.void mark_buffer_dirty(struct buffer_head *bh)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM2ubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhjhM2ubj2)}(hmark_buffer_dirtyh]j8)}(hmark_buffer_dirtyh]hmark_buffer_dirty}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hjhhhjhM2ubjS)}(h(struct buffer_head *bh)h]jY)}(hstruct buffer_head *bhh](j_)}(hjbh]hstruct}(hj"hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjubj!)}(h h]h }(hj/hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hj@hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj=ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjBmodnameN classnameNjj)}j]j)}jjsbc.mark_buffer_dirtyasbuh1hhjubj!)}(h h]h }(hj`hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj8)}(hbhh]hbh}(hj{hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjubah}(h]h ]h"]h$]h&]jPjQuh1jRhjhhhjhM2ubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhjhhhjhM2ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhM2hjhhubj)}(hhh]h)}(h&mark a buffer_head as needing writeouth]h&mark a buffer_head as needing writeout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM2hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM2ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct buffer_head *bh`` the buffer_head to mark dirty **Description** mark_buffer_dirty() will set the dirty bit against the buffer, then set its backing page dirty, then tag the page as dirty in the page cache and then attach the address_space's inode to its superblock's dirty inode list. mark_buffer_dirty() is atomic. It takes bh->b_folio->mapping->i_private_lock, i_pages lock and mapping->host->i_lock.h](h)}(h**Parameters**h]j))}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM6hjubj?)}(hhh]jD)}(h9``struct buffer_head *bh`` the buffer_head to mark dirty h](jJ)}(h``struct buffer_head *bh``h]jP)}(hjh]hstruct buffer_head *bh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM3hjubjf)}(hhh]h)}(hthe buffer_head to mark dirtyh]hthe buffer_head to mark dirty}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM3hjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhM3hjubah}(h]h ]h"]h$]h&]uh1j>hjubh)}(h**Description**h]j))}(hj!h]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM5hjubh)}(hmark_buffer_dirty() will set the dirty bit against the buffer, then set its backing page dirty, then tag the page as dirty in the page cache and then attach the address_space's inode to its superblock's dirty inode list.h]hmark_buffer_dirty() will set the dirty bit against the buffer, then set its backing page dirty, then tag the page as dirty in the page cache and then attach the address_space’s inode to its superblock’s dirty inode list.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM4hjubh)}(hvmark_buffer_dirty() is atomic. It takes bh->b_folio->mapping->i_private_lock, i_pages lock and mapping->host->i_lock.h]hvmark_buffer_dirty() is atomic. It takes bh->b_folio->mapping->i_private_lock, i_pages lock and mapping->host->i_lock.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM9hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h__brelse (C function) c.__brelsehNtauh1hhhhhhNhNubh)}(hhh](j)}(h&void __brelse (struct buffer_head *bh)h]j )}(h%void __brelse(struct buffer_head *bh)h](j)}(hvoidh]hvoid}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqhhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjqhhhjhMjubj2)}(h__brelseh]j8)}(h__brelseh]h__brelse}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hjqhhhjhMjubjS)}(h(struct buffer_head *bh)h]jY)}(hstruct buffer_head *bhh](j_)}(hjbh]hstruct}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsb c.__brelseasbuh1hhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj8)}(hbhh]hbh}(hj hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjubah}(h]h ]h"]h$]h&]jPjQuh1jRhjqhhhjhMjubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhjmhhhjhMjubah}(h]jhah ](jjeh"]h$]h&]jj)jhuh1jhjhMjhjjhhubj)}(hhh]h)}(hRelease a buffer.h]hRelease a buffer.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMjhj2hhubah}(h]h ]h"]h$]h&]uh1jhjjhhhjhMjubeh}(h]h ](jfunctioneh"]h$]h&]jjjjMjjMjjjuh1hhhhhhNhNubj)}(h**Parameters** ``struct buffer_head *bh`` The buffer to release. **Description** This variant of brelse() can be called if **bh** is guaranteed to not be NULL.h](h)}(h**Parameters**h]j))}(hjWh]h Parameters}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjUubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMnhjQubj?)}(hhh]jD)}(h2``struct buffer_head *bh`` The buffer to release. h](jJ)}(h``struct buffer_head *bh``h]jP)}(hjvh]hstruct buffer_head *bh}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjtubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMkhjpubjf)}(hhh]h)}(hThe buffer to release.h]hThe buffer to release.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMkhjubah}(h]h ]h"]h$]h&]uh1jehjpubeh}(h]h ]h"]h$]h&]uh1jChjhMkhjmubah}(h]h ]h"]h$]h&]uh1j>hjQubh)}(h**Description**h]j))}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMmhjQubh)}(hNThis variant of brelse() can be called if **bh** is guaranteed to not be NULL.h](h*This variant of brelse() can be called if }(hjhhhNhNubj))}(h**bh**h]hbh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh is guaranteed to not be NULL.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMlhjQubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h__bforget (C function) c.__bforgethNtauh1hhhhhhNhNubh)}(hhh](j)}(h'void __bforget (struct buffer_head *bh)h]j )}(h&void __bforget(struct buffer_head *bh)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMzubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhjhMzubj2)}(h __bforgeth]j8)}(h __bforgeth]h __bforget}(hj)hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj%ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hjhhhjhMzubjS)}(h(struct buffer_head *bh)h]jY)}(hstruct buffer_head *bhh](j_)}(hjbh]hstruct}(hjEhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjAubj!)}(h h]h }(hjRhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjAubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hjchhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj`ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjemodnameN classnameNjj)}j]j)}jj+sb c.__bforgetasbuh1hhjAubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjAubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubj8)}(hbhh]hbh}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjAubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj=ubah}(h]h ]h"]h$]h&]jPjQuh1jRhjhhhjhMzubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhjhhhjhMzubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhMzhjhhubj)}(hhh]h)}(h#Discard any dirty data in a buffer.h]h#Discard any dirty data in a buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMzhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMzubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1hhhhhhNhNubj)}(h**Parameters** ``struct buffer_head *bh`` The buffer to forget. **Description** This variant of bforget() can be called if **bh** is guaranteed to not be NULL.h](h)}(h**Parameters**h]j))}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM~hjubj?)}(hhh]jD)}(h1``struct buffer_head *bh`` The buffer to forget. h](jJ)}(h``struct buffer_head *bh``h]jP)}(hj h]hstruct buffer_head *bh}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM{hjubjf)}(hhh]h)}(hThe buffer to forget.h]hThe buffer to forget.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM{hjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhM{hjubah}(h]h ]h"]h$]h&]uh1j>hjubh)}(h**Description**h]j))}(hjDh]h Description}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjBubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM}hjubh)}(hOThis variant of bforget() can be called if **bh** is guaranteed to not be NULL.h](h+This variant of bforget() can be called if }(hjZhhhNhNubj))}(h**bh**h]hbh}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjZubh is guaranteed to not be NULL.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM|hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hbdev_getblk (C function) c.bdev_getblkhNtauh1hhhhhhNhNubh)}(hhh](j)}(hfstruct buffer_head * bdev_getblk (struct block_device *bdev, sector_t block, unsigned size, gfp_t gfp)h]j )}(hdstruct buffer_head *bdev_getblk(struct block_device *bdev, sector_t block, unsigned size, gfp_t gfp)h](j_)}(hjbh]hstruct}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjhhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM3ubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhjhM3ubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}j bdev_getblksb c.bdev_getblkasbuh1hhjhhhjhM3ubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhjhM3ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM3ubj2)}(h bdev_getblkh]j8)}(hjh]h bdev_getblk}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hjhhhjhM3ubjS)}(hE(struct block_device *bdev, sector_t block, unsigned size, gfp_t gfp)h](jY)}(hstruct block_device *bdevh](j_)}(hjbh]hstruct}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjubj!)}(h h]h }(hj"hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubh)}(hhh]j8)}(h block_deviceh]h block_device}(hj3hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj0ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj5modnameN classnameNjj)}j]j c.bdev_getblkasbuh1hhjubj!)}(h h]h }(hjQhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj)}(hjh]h*}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj8)}(hbdevh]hbdev}(hjlhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj ubjY)}(hsector_t blockh](h)}(hhh]j8)}(hsector_th]hsector_t}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.bdev_getblkasbuh1hhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj8)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj ubjY)}(h unsigned sizeh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj8)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj ubjY)}(h gfp_t gfph](h)}(hhh]j8)}(hgfp_th]hgfp_t}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j c.bdev_getblkasbuh1hhjubj!)}(h h]h }(hj#hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj8)}(hgfph]hgfp}(hj1hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj ubeh}(h]h ]h"]h$]h&]jPjQuh1jRhjhhhjhM3ubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhjhhhjhM3ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhM3hjhhubj)}(hhh]h)}(h3Get a buffer_head in a block device's buffer cache.h]h5Get a buffer_head in a block device’s buffer cache.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM3hjXhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM3ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjsjjsjjjuh1hhhhhhNhNubj)}(hXG**Parameters** ``struct block_device *bdev`` The block device. ``sector_t block`` The block number. ``unsigned size`` The size of buffer_heads for this **bdev**. ``gfp_t gfp`` The memory allocation flags to use. **Description** The returned buffer head has its reference count incremented, but is not locked. The caller should call brelse() when it has finished with the buffer. The buffer may not be uptodate. If needed, the caller can bring it uptodate either by reading it or overwriting it. **Return** The buffer head, or NULL if memory could not be allocated.h](h)}(h**Parameters**h]j))}(hj}h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj{ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM7hjwubj?)}(hhh](jD)}(h0``struct block_device *bdev`` The block device. h](jJ)}(h``struct block_device *bdev``h]jP)}(hjh]hstruct block_device *bdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM4hjubjf)}(hhh]h)}(hThe block device.h]hThe block device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM4hjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhM4hjubjD)}(h%``sector_t block`` The block number. h](jJ)}(h``sector_t block``h]jP)}(hjh]hsector_t block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM5hjubjf)}(hhh]h)}(hThe block number.h]hThe block number.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChjhM5hjubjD)}(h>``unsigned size`` The size of buffer_heads for this **bdev**. h](jJ)}(h``unsigned size``h]jP)}(hjh]h unsigned size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM6hjubjf)}(hhh]h)}(h+The size of buffer_heads for this **bdev**.h](h"The size of buffer_heads for this }(hj'hhhNhNubj))}(h**bdev**h]hbdev}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj'ubh.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj#hM6hj$ubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChj#hM6hjubjD)}(h2``gfp_t gfp`` The memory allocation flags to use. h](jJ)}(h ``gfp_t gfp``h]jP)}(hjYh]h gfp_t gfp}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjWubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM7hjSubjf)}(hhh]h)}(h#The memory allocation flags to use.h]h#The memory allocation flags to use.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhM7hjoubah}(h]h ]h"]h$]h&]uh1jehjSubeh}(h]h ]h"]h$]h&]uh1jChjnhM7hjubeh}(h]h ]h"]h$]h&]uh1j>hjwubh)}(h**Description**h]j))}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM9hjwubh)}(hX The returned buffer head has its reference count incremented, but is not locked. The caller should call brelse() when it has finished with the buffer. The buffer may not be uptodate. If needed, the caller can bring it uptodate either by reading it or overwriting it.h]hX The returned buffer head has its reference count incremented, but is not locked. The caller should call brelse() when it has finished with the buffer. The buffer may not be uptodate. If needed, the caller can bring it uptodate either by reading it or overwriting it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM8hjwubh)}(h **Return**h]j))}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM=hjwubh)}(h:The buffer head, or NULL if memory could not be allocated.h]h:The buffer head, or NULL if memory could not be allocated.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM>hjwubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h__bread_gfp (C function) c.__bread_gfphNtauh1hhhhhhNhNubh)}(hhh](j)}(hfstruct buffer_head * __bread_gfp (struct block_device *bdev, sector_t block, unsigned size, gfp_t gfp)h]j )}(hdstruct buffer_head *__bread_gfp(struct block_device *bdev, sector_t block, unsigned size, gfp_t gfp)h](j_)}(hjbh]hstruct}(hjhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjhhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMbubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhj hMbubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj!modnameN classnameNjj)}j]j)}j __bread_gfpsb c.__bread_gfpasbuh1hhjhhhj hMbubj!)}(h h]h }(hj@hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjhhhj hMbubj)}(hjh]h*}(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj hMbubj2)}(h __bread_gfph]j8)}(hj=h]h __bread_gfp}(hj_hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj[ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hjhhhj hMbubjS)}(hE(struct block_device *bdev, sector_t block, unsigned size, gfp_t gfp)h](jY)}(hstruct block_device *bdevh](j_)}(hjbh]hstruct}(hjzhhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjvubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjvubh)}(hhh]j8)}(h block_deviceh]h block_device}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j; c.__bread_gfpasbuh1hhjvubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjvubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj8)}(hbdevh]hbdev}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjvubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjrubjY)}(hsector_t blockh](h)}(hhh]j8)}(hsector_th]hsector_t}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j; c.__bread_gfpasbuh1hhjubj!)}(h h]h }(hj hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjubj8)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjrubjY)}(h unsigned sizeh](j)}(hunsignedh]hunsigned}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj!)}(h h]h }(hj@hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj.ubj8)}(hsizeh]hsize}(hjNhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj.ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjrubjY)}(h gfp_t gfph](h)}(hhh]j8)}(hgfp_th]hgfp_t}(hjjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjgubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjlmodnameN classnameNjj)}j]j; c.__bread_gfpasbuh1hhjcubj!)}(h h]h }(hjhhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjcubj8)}(hgfph]hgfp}(hjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjcubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhjrubeh}(h]h ]h"]h$]h&]jPjQuh1jRhjhhhj hMbubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhjhhhj hMbubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhj hMbhjhhubj)}(hhh]h)}(h Read a block.h]h Read a block.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMbhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj hMbubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1hhhhhhNhNubj)}(hXs**Parameters** ``struct block_device *bdev`` The block device to read from. ``sector_t block`` Block number in units of block size. ``unsigned size`` The block size of this device in bytes. ``gfp_t gfp`` Not page allocation flags; see below. **Description** You are not expected to call this function. You should use one of sb_bread(), sb_bread_unmovable() or __bread(). Read a specified block, and return the buffer head that refers to it. If **gfp** is 0, the memory will be allocated using the block device's default GFP flags. If **gfp** is __GFP_MOVABLE, the memory may be allocated from a movable area. Do not pass in a complete set of GFP flags. The returned buffer head has its refcount increased. The caller should call brelse() when it has finished with the buffer. **Context** May sleep waiting for I/O. **Return** NULL if the block was unreadable.h](h)}(h**Parameters**h]j))}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMfhjubj?)}(hhh](jD)}(h=``struct block_device *bdev`` The block device to read from. h](jJ)}(h``struct block_device *bdev``h]jP)}(hj h]hstruct block_device *bdev}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMchjubjf)}(hhh]h)}(hThe block device to read from.h]hThe block device to read from.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMchj ubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jChj hMchjubjD)}(h8``sector_t block`` Block number in units of block size. h](jJ)}(h``sector_t block``h]jP)}(hj: h]hsector_t block}(hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj8 ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMdhj4 ubjf)}(hhh]h)}(h$Block number in units of block size.h]h$Block number in units of block size.}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjO hMdhjP ubah}(h]h ]h"]h$]h&]uh1jehj4 ubeh}(h]h ]h"]h$]h&]uh1jChjO hMdhjubjD)}(h:``unsigned size`` The block size of this device in bytes. h](jJ)}(h``unsigned size``h]jP)}(hjs h]h unsigned size}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjq ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMehjm ubjf)}(hhh]h)}(h'The block size of this device in bytes.h]h'The block size of this device in bytes.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMehj ubah}(h]h ]h"]h$]h&]uh1jehjm ubeh}(h]h ]h"]h$]h&]uh1jChj hMehjubjD)}(h4``gfp_t gfp`` Not page allocation flags; see below. h](jJ)}(h ``gfp_t gfp``h]jP)}(hj h]h gfp_t gfp}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMfhj ubjf)}(hhh]h)}(h%Not page allocation flags; see below.h]h%Not page allocation flags; see below.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMfhj ubah}(h]h ]h"]h$]h&]uh1jehj ubeh}(h]h ]h"]h$]h&]uh1jChj hMfhjubeh}(h]h ]h"]h$]h&]uh1j>hjubh)}(h**Description**h]j))}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhhjubh)}(hqYou are not expected to call this function. You should use one of sb_bread(), sb_bread_unmovable() or __bread().h]hqYou are not expected to call this function. You should use one of sb_bread(), sb_bread_unmovable() or __bread().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMghjubh)}(hXRead a specified block, and return the buffer head that refers to it. If **gfp** is 0, the memory will be allocated using the block device's default GFP flags. If **gfp** is __GFP_MOVABLE, the memory may be allocated from a movable area. Do not pass in a complete set of GFP flags.h](hIRead a specified block, and return the buffer head that refers to it. If }(hj !hhhNhNubj))}(h**gfp**h]hgfp}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj !ubhV is 0, the memory will be allocated using the block device’s default GFP flags. If }(hj !hhhNhNubj))}(h**gfp**h]hgfp}(hj&!hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj !ubhp is __GFP_MOVABLE, the memory may be allocated from a movable area. Do not pass in a complete set of GFP flags.}(hj !hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMjhjubh)}(h{The returned buffer head has its refcount increased. The caller should call brelse() when it has finished with the buffer.h]h{The returned buffer head has its refcount increased. The caller should call brelse() when it has finished with the buffer.}(hj?!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMphjubh)}(h **Context**h]j))}(hjP!h]hContext}(hjR!hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjN!ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMshjubh)}(hMay sleep waiting for I/O.h]hMay sleep waiting for I/O.}(hjf!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMthjubh)}(h **Return**h]j))}(hjw!h]hReturn}(hjy!hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hju!ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMvhjubh)}(h!NULL if the block was unreadable.h]h!NULL if the block was unreadable.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMuhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h#block_invalidate_folio (C function)c.block_invalidate_foliohNtauh1hhhhhhNhNubh)}(hhh](j)}(hOvoid block_invalidate_folio (struct folio *folio, size_t offset, size_t length)h]j )}(hNvoid block_invalidate_folio(struct folio *folio, size_t offset, size_t length)h](j)}(hvoidh]hvoid}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!hhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMubj!)}(h h]h }(hj!hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj!hhhj!hMubj2)}(hblock_invalidate_folioh]j8)}(hblock_invalidate_folioh]hblock_invalidate_folio}(hj!hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj!ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hj!hhhj!hMubjS)}(h3(struct folio *folio, size_t offset, size_t length)h](jY)}(hstruct folio *folioh](j_)}(hjbh]hstruct}(hj!hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj!ubj!)}(h h]h }(hj"hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj!ubh)}(hhh]j8)}(hfolioh]hfolio}(hj"hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj"modnameN classnameNjj)}j]j)}jj!sbc.block_invalidate_folioasbuh1hhj!ubj!)}(h h]h }(hj7"hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj!ubj)}(hjh]h*}(hjE"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubj8)}(hfolioh]hfolio}(hjR"hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj!ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj!ubjY)}(h size_t offseth](h)}(hhh]j8)}(hsize_th]hsize_t}(hjn"hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjk"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjp"modnameN classnameNjj)}j]j3"c.block_invalidate_folioasbuh1hhjg"ubj!)}(h h]h }(hj"hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjg"ubj8)}(hoffseth]hoffset}(hj"hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjg"ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj!ubjY)}(h size_t lengthh](h)}(hhh]j8)}(hsize_th]hsize_t}(hj"hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj"modnameN classnameNjj)}j]j3"c.block_invalidate_folioasbuh1hhj"ubj!)}(h h]h }(hj"hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj"ubj8)}(hlengthh]hlength}(hj"hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj"ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj!ubeh}(h]h ]h"]h$]h&]jPjQuh1jRhj!hhhj!hMubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhj!hhhj!hMubah}(h]j!ah ](jjeh"]h$]h&]jj)jhuh1jhj!hMhj!hhubj)}(hhh]h)}(h0Invalidate part or all of a buffer-backed folio.h]h0Invalidate part or all of a buffer-backed folio.}(hj #hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj #hhubah}(h]h ]h"]h$]h&]uh1jhj!hhhj!hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj$#jj$#jjjuh1hhhhhhNhNubj)}(hXe**Parameters** ``struct folio *folio`` The folio which is affected. ``size_t offset`` start of the range to invalidate ``size_t length`` length of the range to invalidate **Description** block_invalidate_folio() is called when all or part of the folio has been invalidated by a truncate operation. block_invalidate_folio() does not have to release all buffers, but it must ensure that no dirty buffer is left outside **offset** and that no I/O is underway against any of the blocks which are outside the truncation point. Because the caller is about to free (and possibly reuse) those blocks on-disk.h](h)}(h**Parameters**h]j))}(hj.#h]h Parameters}(hj0#hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj,#ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj(#ubj?)}(hhh](jD)}(h5``struct folio *folio`` The folio which is affected. h](jJ)}(h``struct folio *folio``h]jP)}(hjM#h]hstruct folio *folio}(hjO#hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjK#ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhjG#ubjf)}(hhh]h)}(hThe folio which is affected.h]hThe folio which is affected.}(hjf#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb#hMhjc#ubah}(h]h ]h"]h$]h&]uh1jehjG#ubeh}(h]h ]h"]h$]h&]uh1jChjb#hMhjD#ubjD)}(h3``size_t offset`` start of the range to invalidate h](jJ)}(h``size_t offset``h]jP)}(hj#h]h size_t offset}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj#ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj#ubjf)}(hhh]h)}(h start of the range to invalidateh]h start of the range to invalidate}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMhj#ubah}(h]h ]h"]h$]h&]uh1jehj#ubeh}(h]h ]h"]h$]h&]uh1jChj#hMhjD#ubjD)}(h4``size_t length`` length of the range to invalidate h](jJ)}(h``size_t length``h]jP)}(hj#h]h size_t length}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj#ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj#ubjf)}(hhh]h)}(h!length of the range to invalidateh]h!length of the range to invalidate}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMhj#ubah}(h]h ]h"]h$]h&]uh1jehj#ubeh}(h]h ]h"]h$]h&]uh1jChj#hMhjD#ubeh}(h]h ]h"]h$]h&]uh1j>hj(#ubh)}(h**Description**h]j))}(hj#h]h Description}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj#ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj(#ubh)}(hnblock_invalidate_folio() is called when all or part of the folio has been invalidated by a truncate operation.h]hnblock_invalidate_folio() is called when all or part of the folio has been invalidated by a truncate operation.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj(#ubh)}(hX/block_invalidate_folio() does not have to release all buffers, but it must ensure that no dirty buffer is left outside **offset** and that no I/O is underway against any of the blocks which are outside the truncation point. Because the caller is about to free (and possibly reuse) those blocks on-disk.h](hwblock_invalidate_folio() does not have to release all buffers, but it must ensure that no dirty buffer is left outside }(hj$hhhNhNubj))}(h **offset**h]hoffset}(hj'$hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj$ubh and that no I/O is underway against any of the blocks which are outside the truncation point. Because the caller is about to free (and possibly reuse) those blocks on-disk.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMhj(#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hclean_bdev_aliases (C function)c.clean_bdev_aliaseshNtauh1hhhhhhNhNubh)}(hhh](j)}(hQvoid clean_bdev_aliases (struct block_device *bdev, sector_t block, sector_t len)h]j )}(hPvoid clean_bdev_aliases(struct block_device *bdev, sector_t block, sector_t len)h](j)}(hvoidh]hvoid}(hj`$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\$hhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMPubj!)}(h h]h }(hjo$hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj\$hhhjn$hMPubj2)}(hclean_bdev_aliasesh]j8)}(hclean_bdev_aliasesh]hclean_bdev_aliases}(hj$hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj}$ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hj\$hhhjn$hMPubjS)}(h9(struct block_device *bdev, sector_t block, sector_t len)h](jY)}(hstruct block_device *bdevh](j_)}(hjbh]hstruct}(hj$hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj$ubj!)}(h h]h }(hj$hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj$ubh)}(hhh]j8)}(h block_deviceh]h block_device}(hj$hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj$modnameN classnameNjj)}j]j)}jj$sbc.clean_bdev_aliasesasbuh1hhj$ubj!)}(h h]h }(hj$hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj$ubj)}(hjh]h*}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj8)}(hbdevh]hbdev}(hj$hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj$ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj$ubjY)}(hsector_t blockh](h)}(hhh]j8)}(hsector_th]hsector_t}(hj%hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj%modnameN classnameNjj)}j]j$c.clean_bdev_aliasesasbuh1hhj %ubj!)}(h h]h }(hj0%hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj %ubj8)}(hblockh]hblock}(hj>%hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj %ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj$ubjY)}(h sector_t lenh](h)}(hhh]j8)}(hsector_th]hsector_t}(hjZ%hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjW%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj\%modnameN classnameNjj)}j]j$c.clean_bdev_aliasesasbuh1hhjS%ubj!)}(h h]h }(hjx%hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjS%ubj8)}(hlenh]hlen}(hj%hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjS%ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj$ubeh}(h]h ]h"]h$]h&]jPjQuh1jRhj\$hhhjn$hMPubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhjX$hhhjn$hMPubah}(h]jS$ah ](jjeh"]h$]h&]jj)jhuh1jhjn$hMPhjU$hhubj)}(hhh]h)}(h(clean a range of buffers in block deviceh]h(clean a range of buffers in block device}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMPhj%hhubah}(h]h ]h"]h$]h&]uh1jhjU$hhhjn$hMPubeh}(h]h ](jfunctioneh"]h$]h&]jjjj%jj%jjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct block_device *bdev`` Block device to clean buffers in ``sector_t block`` Start of a range of blocks to clean ``sector_t len`` Number of blocks to clean **Description** We are taking a range of blocks for data and we don't want writeback of any buffer-cache aliases starting from return from this function and until the moment when something will explicitly mark the buffer dirty (hopefully that will not happen until we will free that block ;-) We don't even need to mark it not-uptodate - nobody can expect anything from a newly allocated buffer anyway. We used to use unmap_buffer() for such invalidation, but that was wrong. We definitely don't want to mark the alias unmapped, for example - it would confuse anyone who might pick it with bread() afterwards... Also.. Note that bforget() doesn't lock the buffer. So there can be writeout I/O going on against recently-freed buffers. We don't wait on that I/O in bforget() - it's more efficient to wait on the I/O only if we really need to. That happens here.h](h)}(h**Parameters**h]j))}(hj%h]h Parameters}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj%ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMThj%ubj?)}(hhh](jD)}(h?``struct block_device *bdev`` Block device to clean buffers in h](jJ)}(h``struct block_device *bdev``h]jP)}(hj%h]hstruct block_device *bdev}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj%ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMQhj%ubjf)}(hhh]h)}(h Block device to clean buffers inh]h Block device to clean buffers in}(hj &hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMQhj&ubah}(h]h ]h"]h$]h&]uh1jehj%ubeh}(h]h ]h"]h$]h&]uh1jChj&hMQhj%ubjD)}(h7``sector_t block`` Start of a range of blocks to clean h](jJ)}(h``sector_t block``h]jP)}(hj*&h]hsector_t block}(hj,&hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj(&ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMRhj$&ubjf)}(hhh]h)}(h#Start of a range of blocks to cleanh]h#Start of a range of blocks to clean}(hjC&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?&hMRhj@&ubah}(h]h ]h"]h$]h&]uh1jehj$&ubeh}(h]h ]h"]h$]h&]uh1jChj?&hMRhj%ubjD)}(h+``sector_t len`` Number of blocks to clean h](jJ)}(h``sector_t len``h]jP)}(hjc&h]h sector_t len}(hje&hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhja&ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMShj]&ubjf)}(hhh]h)}(hNumber of blocks to cleanh]hNumber of blocks to clean}(hj|&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjx&hMShjy&ubah}(h]h ]h"]h$]h&]uh1jehj]&ubeh}(h]h ]h"]h$]h&]uh1jChjx&hMShj%ubeh}(h]h ]h"]h$]h&]uh1j>hj%ubh)}(h**Description**h]j))}(hj&h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj&ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMUhj%ubh)}(hXSWe are taking a range of blocks for data and we don't want writeback of any buffer-cache aliases starting from return from this function and until the moment when something will explicitly mark the buffer dirty (hopefully that will not happen until we will free that block ;-) We don't even need to mark it not-uptodate - nobody can expect anything from a newly allocated buffer anyway. We used to use unmap_buffer() for such invalidation, but that was wrong. We definitely don't want to mark the alias unmapped, for example - it would confuse anyone who might pick it with bread() afterwards...h]hXYWe are taking a range of blocks for data and we don’t want writeback of any buffer-cache aliases starting from return from this function and until the moment when something will explicitly mark the buffer dirty (hopefully that will not happen until we will free that block ;-) We don’t even need to mark it not-uptodate - nobody can expect anything from a newly allocated buffer anyway. We used to use unmap_buffer() for such invalidation, but that was wrong. We definitely don’t want to mark the alias unmapped, for example - it would confuse anyone who might pick it with bread() afterwards...}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chMThj%ubh)}(hAlso.. Note that bforget() doesn't lock the buffer. So there can be writeout I/O going on against recently-freed buffers. We don't wait on that I/O in bforget() - it's more efficient to wait on the I/O only if we really need to. That happens here.h]hXAlso.. Note that bforget() doesn’t lock the buffer. So there can be writeout I/O going on against recently-freed buffers. We don’t wait on that I/O in bforget() - it’s more efficient to wait on the I/O only if we really need to. That happens here.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM]hj%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h try_to_free_buffers (C function)c.try_to_free_buffershNtauh1hhhhhhNhNubh)}(hhh](j)}(h.bool try_to_free_buffers (struct folio *folio)h]j )}(h-bool try_to_free_buffers(struct folio *folio)h](j)}(hj h]hbool}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&hhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM ubj!)}(h h]h }(hj'hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj&hhhj&hM ubj2)}(htry_to_free_buffersh]j8)}(htry_to_free_buffersh]htry_to_free_buffers}(hj'hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj'ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hj&hhhj&hM ubjS)}(h(struct folio *folio)h]jY)}(hstruct folio *folioh](j_)}(hjbh]hstruct}(hj.'hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj*'ubj!)}(h h]h }(hj;'hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj*'ubh)}(hhh]j8)}(hfolioh]hfolio}(hjL'hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjI'ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjN'modnameN classnameNjj)}j]j)}jj'sbc.try_to_free_buffersasbuh1hhj*'ubj!)}(h h]h }(hjl'hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj*'ubj)}(hjh]h*}(hjz'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*'ubj8)}(hfolioh]hfolio}(hj'hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj*'ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj&'ubah}(h]h ]h"]h$]h&]jPjQuh1jRhj&hhhj&hM ubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhj&hhhj&hM ubah}(h]j&ah ](jjeh"]h$]h&]jj)jhuh1jhj&hM hj&hhubj)}(hhh]h)}(h'Release buffers attached to this folio.h]h'Release buffers attached to this folio.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj'hhubah}(h]h ]h"]h$]h&]uh1jhj&hhhj&hM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj'jj'jjjuh1hhhhhhNhNubj)}(hX**Parameters** ``struct folio *folio`` The folio. **Description** If any buffers are in use (dirty, under writeback, elevated refcount), no buffers will be freed. If the folio is dirty but all the buffers are clean then we need to be sure to mark the folio clean as well. This is because the folio may be against a block device, and a later reattachment of buffers to a dirty folio will set *all* buffers dirty. Which would corrupt filesystem data on the same device. The same applies to regular filesystem folios: if all the buffers are clean then we set the folio clean and proceed. To do that, we require total exclusion from block_dirty_folio(). That is obtained with i_private_lock. Exclusion against try_to_free_buffers may be obtained by either locking the folio or by holding its mapping's i_private_lock. **Context** Process context. **folio** must be locked. Will not sleep. **Return** true if all buffers attached to this folio were freed.h](h)}(h**Parameters**h]j))}(hj'h]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj'ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj'ubj?)}(hhh]jD)}(h#``struct folio *folio`` The folio. h](jJ)}(h``struct folio *folio``h]jP)}(hj'h]hstruct folio *folio}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj'ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj'ubjf)}(hhh]h)}(h The folio.h]h The folio.}(hj (hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hM hj(ubah}(h]h ]h"]h$]h&]uh1jehj'ubeh}(h]h ]h"]h$]h&]uh1jChj(hM hj'ubah}(h]h ]h"]h$]h&]uh1j>hj'ubh)}(h**Description**h]j))}(hj-(h]h Description}(hj/(hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj+(ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj'ubh)}(h`If any buffers are in use (dirty, under writeback, elevated refcount), no buffers will be freed.h]h`If any buffers are in use (dirty, under writeback, elevated refcount), no buffers will be freed.}(hjC(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj'ubh)}(hX2If the folio is dirty but all the buffers are clean then we need to be sure to mark the folio clean as well. This is because the folio may be against a block device, and a later reattachment of buffers to a dirty folio will set *all* buffers dirty. Which would corrupt filesystem data on the same device.h](hIf the folio is dirty but all the buffers are clean then we need to be sure to mark the folio clean as well. This is because the folio may be against a block device, and a later reattachment of buffers to a dirty folio will set }(hjR(hhhNhNubhemphasis)}(h*all*h]hall}(hj\(hhhNhNubah}(h]h ]h"]h$]h&]uh1jZ(hjR(ubhH buffers dirty. Which would corrupt filesystem data on the same device.}(hjR(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj'ubh)}(hThe same applies to regular filesystem folios: if all the buffers are clean then we set the folio clean and proceed. To do that, we require total exclusion from block_dirty_folio(). That is obtained with i_private_lock.h]hThe same applies to regular filesystem folios: if all the buffers are clean then we set the folio clean and proceed. To do that, we require total exclusion from block_dirty_folio(). That is obtained with i_private_lock.}(h\ju(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj'ubh)}(h}Exclusion against try_to_free_buffers may be obtained by either locking the folio or by holding its mapping's i_private_lock.h]hExclusion against try_to_free_buffers may be obtained by either locking the folio or by holding its mapping’s i_private_lock.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj'ubh)}(h **Context**h]j))}(hj(h]hContext}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj(ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM! hj'ubh)}(hhj)ubh)}(h**Description**h]j))}(hjO*h]h Description}(hjQ*hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjM*ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj)ubh)}(hRReturn true if the buffer is up-to-date and false, with the buffer locked, if not.h]hRReturn true if the buffer is up-to-date and false, with the buffer locked, if not.}(hje*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h__bh_read (C function) c.__bh_readhNtauh1hhhhhhNhNubh)}(hhh](j)}(hEint __bh_read (struct buffer_head *bh, blk_opf_t op_flags, bool wait)h]j )}(hDint __bh_read(struct buffer_head *bh, blk_opf_t op_flags, bool wait)h](j)}(hinth]hint}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM ubj!)}(h h]h }(hj*hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj*hhhj*hM ubj2)}(h __bh_readh]j8)}(h __bh_readh]h __bh_read}(hj*hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj*ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hj*hhhj*hM ubjS)}(h7(struct buffer_head *bh, blk_opf_t op_flags, bool wait)h](jY)}(hstruct buffer_head *bhh](j_)}(hjbh]hstruct}(hj*hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hj*ubj!)}(h h]h }(hj*hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj*ubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hj*hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj*ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj*modnameN classnameNjj)}j]j)}jj*sb c.__bh_readasbuh1hhj*ubj!)}(h h]h }(hj+hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj*ubj)}(hjh]h*}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj8)}(hbhh]hbh}(hj*+hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj*ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj*ubjY)}(hblk_opf_t op_flagsh](h)}(hhh]j8)}(h blk_opf_th]h blk_opf_t}(hjF+hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjC+ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjH+modnameN classnameNjj)}j]j + c.__bh_readasbuh1hhj?+ubj!)}(h h]h }(hjd+hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj?+ubj8)}(hop_flagsh]hop_flags}(hjr+hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj?+ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj*ubjY)}(h bool waith](j)}(hj h]hbool}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubj!)}(h h]h }(hj+hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj+ubj8)}(hwaith]hwait}(hj+hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj+ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj*ubeh}(h]h ]h"]h$]h&]jPjQuh1jRhj*hhhj*hM ubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhj*hhhj*hM ubah}(h]j*ah ](jjeh"]h$]h&]jj)jhuh1jhj*hM hj*hhubj)}(hhh]h)}(hSubmit read for a locked bufferh]hSubmit read for a locked buffer}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj+hhubah}(h]h ]h"]h$]h&]uh1jhj*hhhj*hM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj+jj+jjjuh1hhhhhhNhNubj)}(h**Parameters** ``struct buffer_head *bh`` struct buffer_head ``blk_opf_t op_flags`` appending REQ_OP_* flags besides REQ_OP_READ ``bool wait`` wait until reading finish **Description** Returns zero on success or don't wait, and -EIO on error.h](h)}(h**Parameters**h]j))}(hj+h]h Parameters}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj+ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj+ubj?)}(hhh](jD)}(h.``struct buffer_head *bh`` struct buffer_head h](jJ)}(h``struct buffer_head *bh``h]jP)}(hj,h]hstruct buffer_head *bh}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj,ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj ,ubjf)}(hhh]h)}(hstruct buffer_headh]hstruct buffer_head}(hj*,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&,hM hj',ubah}(h]h ]h"]h$]h&]uh1jehj ,ubeh}(h]h ]h"]h$]h&]uh1jChj&,hM hj,ubjD)}(hD``blk_opf_t op_flags`` appending REQ_OP_* flags besides REQ_OP_READ h](jJ)}(h``blk_opf_t op_flags``h]jP)}(hjJ,h]hblk_opf_t op_flags}(hjL,hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjH,ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hjD,ubjf)}(hhh]h)}(h,appending REQ_OP_* flags besides REQ_OP_READh]h,appending REQ_OP_* flags besides REQ_OP_READ}(hjc,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_,hM hj`,ubah}(h]h ]h"]h$]h&]uh1jehjD,ubeh}(h]h ]h"]h$]h&]uh1jChj_,hM hj,ubjD)}(h(``bool wait`` wait until reading finish h](jJ)}(h ``bool wait``h]jP)}(hj,h]h bool wait}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj,ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj},ubjf)}(hhh]h)}(hwait until reading finishh]hwait until reading finish}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hM hj,ubah}(h]h ]h"]h$]h&]uh1jehj},ubeh}(h]h ]h"]h$]h&]uh1jChj,hM hj,ubeh}(h]h ]h"]h$]h&]uh1j>hj+ubh)}(h**Description**h]j))}(hj,h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj,ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj+ubh)}(h9Returns zero on success or don't wait, and -EIO on error.h]h;Returns zero on success or don’t wait, and -EIO on error.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](h__bh_read_batch (C function)c.__bh_read_batchhNtauh1hhhhhhNhNubh)}(hhh](j)}(h]void __bh_read_batch (int nr, struct buffer_head *bhs[], blk_opf_t op_flags, bool force_lock)h]j )}(h\void __bh_read_batch(int nr, struct buffer_head *bhs[], blk_opf_t op_flags, bool force_lock)h](j)}(hvoidh]hvoid}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,hhhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM ubj!)}(h h]h }(hj-hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj,hhhj-hM ubj2)}(h__bh_read_batchh]j8)}(h__bh_read_batchh]h__bh_read_batch}(hj$-hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj -ubah}(h]h ](jKjLeh"]h$]h&]jPjQuh1j1hj,hhhj-hM ubjS)}(hH(int nr, struct buffer_head *bhs[], blk_opf_t op_flags, bool force_lock)h](jY)}(hint nrh](j)}(hinth]hint}(hj@-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<-ubj!)}(h h]h }(hjN-hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj<-ubj8)}(hnrh]hnr}(hj\-hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj<-ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj8-ubjY)}(hstruct buffer_head *bhs[]h](j_)}(hjbh]hstruct}(hju-hhhNhNubah}(h]h ]jkah"]h$]h&]uh1j^hjq-ubj!)}(h h]h }(hj-hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjq-ubh)}(hhh]j8)}(h buffer_headh]h buffer_head}(hj-hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj-ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj-modnameN classnameNjj)}j]j)}jj&-sbc.__bh_read_batchasbuh1hhjq-ubj!)}(h h]h }(hj-hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjq-ubj)}(hjh]h*}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq-ubj8)}(hbhsh]hbhs}(hj-hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjq-ubj)}(h[h]h[}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq-ubj)}(h]h]h]}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq-ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj8-ubjY)}(hblk_opf_t op_flagsh](h)}(hhh]j8)}(h blk_opf_th]h blk_opf_t}(hj.hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj.ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj.modnameN classnameNjj)}j]j-c.__bh_read_batchasbuh1hhj-ubj!)}(h h]h }(hj$.hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hj-ubj8)}(hop_flagsh]hop_flags}(hj2.hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj-ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj8-ubjY)}(hbool force_lockh](j)}(hj h]hbool}(hjK.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjG.ubj!)}(h h]h }(hjX.hhhNhNubah}(h]h ]j-ah"]h$]h&]uh1j hjG.ubj8)}(h force_lockh]h force_lock}(hjf.hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjG.ubeh}(h]h ]h"]h$]h&]noemphjPjQuh1jXhj8-ubeh}(h]h ]h"]h$]h&]jPjQuh1jRhj,hhhj-hM ubeh}(h]h ]h"]h$]h&]jPjQjuh1jjjhj,hhhj-hM ubah}(h]j,ah ](jjeh"]h$]h&]jj)jhuh1jhj-hM hj,hhubj)}(hhh]h)}(h+Submit read for a batch of unlocked buffersh]h+Submit read for a batch of unlocked buffers}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj.hhubah}(h]h ]h"]h$]h&]uh1jhj,hhhj-hM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj.jj.jjjuh1hhhhhhNhNubj)}(hX**Parameters** ``int nr`` entry number of the buffer batch ``struct buffer_head *bhs[]`` a batch of struct buffer_head ``blk_opf_t op_flags`` appending REQ_OP_* flags besides REQ_OP_READ ``bool force_lock`` force to get a lock on the buffer if set, otherwise drops any buffer that cannot lock. **Description** Returns zero on success or don't wait, and -EIO on error.h](h)}(h**Parameters**h]j))}(hj.h]h Parameters}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj.ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj.ubj?)}(hhh](jD)}(h,``int nr`` entry number of the buffer batch h](jJ)}(h ``int nr``h]jP)}(hj.h]hint nr}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj.ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj.ubjf)}(hhh]h)}(h entry number of the buffer batchh]h entry number of the buffer batch}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hM hj.ubah}(h]h ]h"]h$]h&]uh1jehj.ubeh}(h]h ]h"]h$]h&]uh1jChj.hM hj.ubjD)}(h<``struct buffer_head *bhs[]`` a batch of struct buffer_head h](jJ)}(h``struct buffer_head *bhs[]``h]jP)}(hj /h]hstruct buffer_head *bhs[]}(hj /hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhj/ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj/ubjf)}(hhh]h)}(ha batch of struct buffer_headh]ha batch of struct buffer_head}(hj#/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hM hj /ubah}(h]h ]h"]h$]h&]uh1jehj/ubeh}(h]h ]h"]h$]h&]uh1jChj/hM hj.ubjD)}(hD``blk_opf_t op_flags`` appending REQ_OP_* flags besides REQ_OP_READ h](jJ)}(h``blk_opf_t op_flags``h]jP)}(hjC/h]hblk_opf_t op_flags}(hjE/hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjA/ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj=/ubjf)}(hhh]h)}(h,appending REQ_OP_* flags besides REQ_OP_READh]h,appending REQ_OP_* flags besides REQ_OP_READ}(hj\/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjX/hM hjY/ubah}(h]h ]h"]h$]h&]uh1jehj=/ubeh}(h]h ]h"]h$]h&]uh1jChjX/hM hj.ubjD)}(hk``bool force_lock`` force to get a lock on the buffer if set, otherwise drops any buffer that cannot lock. h](jJ)}(h``bool force_lock``h]jP)}(hj|/h]hbool force_lock}(hj~/hhhNhNubah}(h]h ]h"]h$]h&]uh1jOhjz/ubah}(h]h ]h"]h$]h&]uh1jIhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hjv/ubjf)}(hhh]h)}(hVforce to get a lock on the buffer if set, otherwise drops any buffer that cannot lock.h]hVforce to get a lock on the buffer if set, otherwise drops any buffer that cannot lock.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj/ubah}(h]h ]h"]h$]h&]uh1jehjv/ubeh}(h]h ]h"]h$]h&]uh1jChj/hM hj.ubeh}(h]h ]h"]h$]h&]uh1j>hj.ubh)}(h**Description**h]j))}(hj/h]h Description}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj/ubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj.ubh)}(h9Returns zero on success or don't wait, and -EIO on error.h]h;Returns zero on success or don’t wait, and -EIO on error.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhN/var/lib/git/docbuild/linux/Documentation/filesystems/buffer:11: ./fs/buffer.chM hj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubeh}(h] functionsah ]h"] functionsah$]h&]uh1hhhhhhhhKubeh}(h] buffer-headsah ]h"] buffer headsah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj0error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehʌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j/j/j/j/u nametypes}(j/j/uh}(j/hj/hhjj jjjjjj j j j jwj|j"j'jjjhjmjjjjjjj!j!jS$jX$j&j&j)j )j*j*j,j,u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.