btrfs-progs/mkfs
Naohiro Aota c821e5545f btrfs-progs: introduce btrfs_pwrite wrapper for pwrite
Wrap pwrite with btrfs_pwrite(). It simply calls pwrite() on non-zoned
btrfs (opened without O_DIRECT). On zoned mode (opened with O_DIRECT),
it allocates an aligned bounce buffer, copies the contents and uses it
for direct-IO writing.

Writes in device_zero_blocks() and btrfs_wipe_existing_sb() are a little
tricky. We don't have fs_info on our hands, so use zinfo to determine it
is a zoned device or not.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2021-10-20 18:59:23 +02:00
..
common.c btrfs-progs: introduce btrfs_pwrite wrapper for pwrite 2021-10-20 18:59:23 +02:00
common.h btrfs-progs: mkfs: don't autoselect DUP on SSD for metadata anymore 2021-10-08 20:47:03 +02:00
main.c btrfs-progs: mkfs: do not set zone size on non-zoned mode 2021-10-08 20:47:04 +02:00
Makefile btrfs-progs: build: add stub makefile to image and mkfs 2019-07-04 15:36:01 +02:00
rootdir.c btrfs-progs: set eb::fs_info properly everywhere 2021-10-08 20:47:04 +02:00
rootdir.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00