lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180809180450.5091-14-naota@elisp.net>
Date:   Fri, 10 Aug 2018 03:04:46 +0900
From:   Naohiro Aota <naota@...sp.net>
To:     David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org
Cc:     Chris Mason <clm@...com>, Josef Bacik <jbacik@...com>,
        linux-kernel@...r.kernel.org, Hannes Reinecke <hare@...e.com>,
        Damien Le Moal <damien.lemoal@....com>,
        Bart Van Assche <bart.vanassche@....com>,
        Matias Bjorling <mb@...htnvm.io>,
        Naohiro Aota <naota@...sp.net>
Subject: [RFC PATCH 13/17] btrfs: avoid sync IO prioritization on checksum in HMZONED mode

By prioritizing sync I/Os, btrfs calls btrfs_map_block() for blocks
allocated later before calling the function allocated earlier. By the
disorder of calling btrfs_map_block(), syncing on I/Os on larger LBAs
sometime wait for I/Os on smaller LBAs.

Since active checksum worker is limited to some specified number, it is
possible to wait for non-starting checksum on smaller LBAs. In such
situation, transactions are stucked waiting for I/Os on smaller LBAs to
finish, which is never finished.

This situation can be reproduced by e.g. fstests btrfs/073.

To avoid such disordering, disable sync IO prioritization for now. In the
future, it will be reworked to finish checksumming of I/Os on smaller I/Os
on committing a transaction.

Signed-off-by: Naohiro Aota <naota@...sp.net>
---
 fs/btrfs/disk-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 00fa6aca9bb5..f79abd5e6b3a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -807,7 +807,7 @@ blk_status_t btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
 
 	async->status = 0;
 
-	if (op_is_sync(bio->bi_opf))
+	if (op_is_sync(bio->bi_opf) && !btrfs_fs_incompat(fs_info, HMZONED))
 		btrfs_set_work_high_priority(&async->work);
 
 	btrfs_queue_work(fs_info->workers, &async->work);
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ