[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ldyjgfwr.fsf@gmail.com>
Date: Sun, 20 Oct 2024 17:11:40 +0530
From: Ritesh Harjani (IBM) <ritesh.list@...il.com>
To: John Garry <john.g.garry@...cle.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
John Garry <john.g.garry@...cle.com> 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.
>
Sure make sense.
-ritesh
Powered by blists - more mailing lists