diff options
author | Aneesh Kumar K.V <[email protected]> | 2009-05-14 17:05:39 -0400 |
---|---|---|
committer | Theodore Ts'o <[email protected]> | 2009-05-14 17:05:39 -0400 |
commit | 2a8964d63d50dd2d65d71d342bc7fb6ef4117614 (patch) | |
tree | 7dd80d63afd9adab61ba0695ac3e0c95485dc2ed /lib/string_helpers.c | |
parent | 33b9817e2ae097c7b8d256e3510ac6c54fc6d9d0 (diff) |
ext4: Clear the unwritten buffer_head flag after the extent is initialized
The BH_Unwritten flag indicates that the buffer is allocated on disk
but has not been written; that is, the disk was part of a persistent
preallocation area. That flag should only be set when a get_blocks()
function is looking up a inode's logical to physical block mapping.
When ext4_get_blocks_wrap() is called with create=1, the uninitialized
extent is converted into an initialized one, so the BH_Unwritten flag
is no longer appropriate. Hence, we need to make sure the
BH_Unwritten is not left set, since the combination of BH_Mapped and
BH_Unwritten is not allowed; among other things, it will result ext4's
get_block() to be called over and over again during the write_begin
phase of write(2).
Signed-off-by: Aneesh Kumar K.V <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions