On Tue, Jul 18, 2023 at 08:56:16PM +0800, zhangpeng (AS) wrote:
How does _this_ folio end up in btrfs's write_dev_supers()? This is aMaybe wait_dev_supers() checks the PageError() after write_dev_supers()if (bio->bi_status) {I appreciate this is a 1:1 conversion, but maybe we could think about
- SetPageError(page);
- ClearPageUptodate(page);
+ folio_set_error(folio);
this a bit. Is there anybody who checks the
PageError()/folio_test_error() for this page/folio?
in fs/btrfs/disk-io.c?
swap read. The only folios which are swapped are anonymous and tmpfs.
btrfs takes care of doing its own I/O. wait_dev_supers() is looking
for the error set in btrfs_end_super_write() which is the completion
routine for write_dev_supers(). The pages involved there are attached
to a btrfs address_space, not shmem or anon.