From: John Garry <john.g.garry@oracle.com>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>,
"Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org, Ritesh Harjani <ritesh.list@gmail.com>,
linux-kernel@vger.kernel.org, dchinner@redhat.com,
Chandan Babu R <chandan.babu@oracle.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v3] xfs: Check for delayed allocations before setting extsize
Date: Mon, 14 Oct 2024 10:56:57 +0100 [thread overview]
Message-ID: <a940924c-5e04-43f1-81f9-1d164fd384cc@oracle.com> (raw)
In-Reply-To: <ZwzgFTX7H35+6S9U@li-bb2b2a4c-3307-11b2-a85c-8fa5c3a69313.ibm.com>
On 14/10/2024 10:10, Ojaswin Mujoo wrote:
> On Fri, Oct 11, 2024 at 09:40:57AM -0700, Darrick J. Wong wrote:
>> On Fri, Oct 11, 2024 at 09:38:30AM -0700, Darrick J. Wong wrote:
>>> On Fri, Oct 11, 2024 at 08:24:27PM +0530, Ojaswin Mujoo wrote:
>>>> Extsize is allowed to be set on files with no data in it.
Should this be "Extsize should only be allowed to be set on files with
no data written."
>For this,
>>>> we were checking if the files have extents but missed to check if
>>>> delayed extents were present. This patch adds that check.
>>>>
>>>> While we are at it, also refactor this check into a helper since
>>>> its used in some other places as well like xfs_inactive() or
>>>> xfs_ioctl_setattr_xflags()
>>>>
>>>> **Without the patch (SUCCEEDS)**
>>>>
>>>> $ xfs_io -c 'open -f testfile' -c 'pwrite 0 1024' -c 'extsize 65536'
>>>>
>>>> wrote 1024/1024 bytes at offset 0
>>>> 1 KiB, 1 ops; 0.0002 sec (4.628 MiB/sec and 4739.3365 ops/sec)
>>>>
>>>> **With the patch (FAILS as expected)**
>>>>
>>>> $ xfs_io -c 'open -f testfile' -c 'pwrite 0 1024' -c 'extsize 65536'
>>>>
>>>> wrote 1024/1024 bytes at offset 0
>>>> 1 KiB, 1 ops; 0.0002 sec (4.628 MiB/sec and 4739.3365 ops/sec)
>>>> xfs_io: FS_IOC_FSSETXATTR testfile: Invalid argument
>>>>
>>>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>>>> Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
>>>
>>> Looks good now,
>>> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
>>
>> That said, could you add a fixes tag for the xfs_ioctl_setattr_*
>> changes, please?
>
> Hi Darrick,
>
> Sure I'll send a new version. Thanks for the review!
>
> Regards,
> ojaswin
>
Feel free to add the following if you like:
Reviewed-by: John Garry <john.g.garry@oracle.com>
next prev parent reply other threads:[~2024-10-14 9:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 14:54 Ojaswin Mujoo
2024-10-11 16:38 ` Darrick J. Wong
2024-10-11 16:40 ` Darrick J. Wong
2024-10-14 9:10 ` Ojaswin Mujoo
2024-10-14 9:56 ` John Garry [this message]
2024-10-14 11:23 ` Ojaswin Mujoo
2024-10-14 9:32 ` Ojaswin Mujoo
2024-10-14 15:28 ` Darrick J. Wong
2024-10-15 6:53 ` Ojaswin Mujoo
2024-10-15 16:22 ` Darrick J. Wong
2024-10-17 7:03 ` Ojaswin Mujoo
2024-10-17 14:56 ` Darrick J. Wong
2024-10-18 9:54 ` Ojaswin Mujoo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a940924c-5e04-43f1-81f9-1d164fd384cc@oracle.com \
--to=john.g.garry@oracle.com \
--cc=chandan.babu@oracle.com \
--cc=dchinner@redhat.com \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®