Movatterモバイル変換


[0]ホーム

URL:


blkdev_issue_zeroout
Prev Chapter 14. Block Devices Next

Name

blkdev_issue_zeroout — zero-fill a block range

Synopsis

intblkdev_issue_zeroout(struct block_device *bdev,
 sector_tsector,
 sector_tnr_sects,
 gfp_tgfp_mask,
 booldiscard);
 

Arguments

struct block_device * bdev

blockdev to write

sector_t sector

start sector

sector_t nr_sects

number of sectors to write

gfp_t gfp_mask

memory allocation flags (for bio_alloc)

bool discard

whether to discard the block range

Description

Zero-fill a block range. If the discard flag is set and the block device guarantees that subsequent READ operations to the block range in question will return zeroes, the blocks will be discarded. Should the discard request fail, if the discard flag is not set, or if discard_zeroes_data is not supported, this function will resort to zeroing the blocks manually, thus provisioning (allocating, anchoring) them. If the block device supports WRITE ZEROES or WRITE SAME command(s),blkdev_issue_zeroout will use it to optimize the process of clearing the block range. Otherwise the zeroing will be performed using regular WRITE calls.


Prev Up Next
__blkdev_issue_zeroout Home blk_queue_find_tag

[8]ページ先頭

©2009-2025 Movatter.jp