Scroll to navigation

CLEAN_BDEV_ALIASES(9) The Linux VFS CLEAN_BDEV_ALIASES(9)

NAME

clean_bdev_aliases -

SYNOPSIS

void clean_bdev_aliases(struct block_device * bdev, sector_t block, sector_t len);

ARGUMENTS

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.

COPYRIGHT

July 2017 Kernel Hackers Manual 4.12