From: Andreas Gruenbacher Subject: Re: [PATCH v2 3/4] ext4: Add iomap support for inline data Date: Mon, 2 Oct 2017 16:39:59 +0200 Message-ID: References: <20170914095047.23935-1-agruenba@redhat.com> <20170914095047.23935-4-agruenba@redhat.com> <20170928175748.23b7wkjiqavpunvj@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: linux-fsdevel , linux-ext4 , linux-xfs@vger.kernel.org, Jan Kara , Christoph Hellwig To: "Theodore Ts'o" Return-path: Received: from mail-ua0-f181.google.com ([209.85.217.181]:55415 "EHLO mail-ua0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbdJBOkA (ORCPT ); Mon, 2 Oct 2017 10:40:00 -0400 Received: by mail-ua0-f181.google.com with SMTP id b11so3370729uae.12 for ; Mon, 02 Oct 2017 07:39:59 -0700 (PDT) In-Reply-To: <20170928175748.23b7wkjiqavpunvj@thunk.org> Sender: linux-ext4-owner@vger.kernel.org List-ID: On Thu, Sep 28, 2017 at 7:57 PM, Theodore Ts'o wrote: > On Thu, Sep 14, 2017 at 11:50:46AM +0200, Andreas Gruenbacher wrote: >> +int ext4_inline_data_iomap(struct inode *inode, struct iomap *iomap) >> +{ >> + __u64 addr; >> + int error = -EAGAIN; >> + struct ext4_iloc iloc; >> + >> + down_read(&EXT4_I(inode)->xattr_sem); >> + if (!ext4_has_inline_data(inode)) >> + goto out; > .... >> +out: >> + up_read(&EXT4_I(inode)->xattr_sem); >> + return error; >> +} > > > If we race with the inline data flag getting cleared, > ext4_iomap_begin() will return with -EAGAIN. Actually, in that case, ext4_iomap_begin will treat the file as non-inline. It will not return -EAGAIN. > As near as I can tell, > this will get reflected all the way up to userspace, instead of having > the retry happen in the kernel. Is this intentional? > > It looks like a user visible change, no? That would be a bug. Thanks, Andreas