[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c4edb568-6fac-4c30-9ca3-12fbefc761e2@oracle.com>
Date: Sun, 20 Oct 2024 12:09:31 +0100
From: John Garry <john.g.garry@...cle.com>
To: "Ritesh Harjani (IBM)" <ritesh.list@...il.com>, axboe@...nel.dk,
brauner@...nel.org, djwong@...nel.org, viro@...iv.linux.org.uk,
jack@...e.cz, dchinner@...hat.com, hch@....de, cem@...nel.org
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org, hare@...e.de,
martin.petersen@...cle.com, catherine.hoang@...cle.com,
mcgrof@...nel.org, ojaswin@...ux.ibm.com
Subject: Re: [PATCH v10 7/8] xfs: Validate atomic writes
On 20/10/2024 10:44, Ritesh Harjani (IBM) wrote:
>> + if (iocb->ki_flags & IOCB_ATOMIC) {
>> + /*
>> + * Currently only atomic writing of a single FS block is
>> + * supported. It would be possible to atomic write smaller than
>> + * a FS block, but there is no requirement to support this.
>> + * Note that iomap also does not support this yet.
>> + */
>> + if (ocount != ip->i_mount->m_sb.sb_blocksize)
>> + return -EINVAL;
> Shouldn't we "return -ENOTSUPP" ?
> Given we are later going to add support for ocount > sb_blocksize.
So far we have been reporting -EINVAL for an invalid atomic write size
(according to atomic write unit min and max reported for that inode).
-ENOTSUPP is used for times when we just don't support atomic writes,
like non-DIO.
Thanks,
John
Powered by blists - more mailing lists