+static bool xfs_file_open_can_atomicwrite(Again, this is static blockdev information - the inode atomic write
+ struct inode *inode,
+ struct file *file)
+{
+ struct xfs_inode *ip = XFS_I(inode);
+ struct xfs_buftarg *target = xfs_inode_buftarg(ip);
+
+ if (!(file->f_flags & O_DIRECT))
+ return false;
+
+ if (!xfs_inode_atomicwrites(ip))
+ return false;
+
+ if (!bdev_can_atomic_write(target->bt_bdev))
+ return false;
flag should not be set if the bdev cannot do atomic writes. It
should be checked at mount time
- the filesystem probably should
only mount read-only if it is configured to allow atomic writes and
the underlying blockdev does not support atomic writes...