Re: [PATCH v10 7/8] xfs: Validate atomic writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux