From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 995CD804 for ; Wed, 31 Aug 2022 10:53:11 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D8D771F8B4; Wed, 31 Aug 2022 10:53:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1661943189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/2pG6/a9zSBeRGL1WuKMWpcsrfg2/SfPKOsUMFRSTMc=; b=WpBBNGvW05bAioDBgYLss3gyUrn8Cs9nfEQNB9M1LclJIIzDofmZcTGrUV6jf6FYB2ppKx JvXiSyv18HY57ebkPeUtX1RJLCSIejNAVkkVc0KmE6bhjjvUvM4U7QZPU5AB44Y2Y5DfzV 5RBtyUMS6ABlZKCCP6qqwjcs/BMPuHM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1661943189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/2pG6/a9zSBeRGL1WuKMWpcsrfg2/SfPKOsUMFRSTMc=; b=BKm/rmA15SUC2af3CeYD8OSCnxEJjrIo9ju9hbO97uiUZqoIEY5Osl8V3pT3S9jb7fEd58 Qp4AnD/tvpyD2tDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C664613A7C; Wed, 31 Aug 2022 10:53:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 2bpwMJU9D2NRbgAAMHmgww (envelope-from ); Wed, 31 Aug 2022 10:53:09 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 553C0A067B; Wed, 31 Aug 2022 12:53:09 +0200 (CEST) Date: Wed, 31 Aug 2022 12:53:09 +0200 From: Jan Kara To: Zhang Yi Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, cluster-devel@redhat.com, ntfs3@lists.linux.dev, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, jack@suse.cz, tytso@mit.edu, akpm@linux-foundation.org, axboe@kernel.dk, viro@zeniv.linux.org.uk, rpeterso@redhat.com, agruenba@redhat.com, almaz.alexandrovich@paragon-software.com, mark@fasheh.com, dushistov@mail.ru, hch@infradead.org, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: Re: [PATCH 05/14] isofs: replace ll_rw_block() Message-ID: <20220831105309.hbsyydkusk2w5hob@quack3> References: <20220831072111.3569680-1-yi.zhang@huawei.com> <20220831072111.3569680-6-yi.zhang@huawei.com> Precedence: bulk X-Mailing-List: ntfs3@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220831072111.3569680-6-yi.zhang@huawei.com> On Wed 31-08-22 15:21:02, Zhang Yi wrote: > ll_rw_block() is not safe for the sync read path because it cannot > guarantee that submitting read IO if the buffer has been locked. We > could get false positive EIO return from zisofs_uncompress_block() if > he buffer has been locked by others. So stop using ll_rw_block(), > switch to sync helper instead. > > Signed-off-by: Zhang Yi Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/isofs/compress.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c > index b466172eec25..ac35eddff29c 100644 > --- a/fs/isofs/compress.c > +++ b/fs/isofs/compress.c > @@ -82,7 +82,7 @@ static loff_t zisofs_uncompress_block(struct inode *inode, loff_t block_start, > return 0; > } > haveblocks = isofs_get_blocks(inode, blocknum, bhs, needblocks); > - ll_rw_block(REQ_OP_READ, haveblocks, bhs); > + bh_read_batch(bhs, haveblocks); > > curbh = 0; > curpage = 0; > -- > 2.31.1 > -- Jan Kara SUSE Labs, CR