Thread (13 messages) 13 messages, 3 authors, 2024-08-21

Re: [PATCH 6/6] xfs: refactor xfs_file_fallocate

From: Brian Foster <hidden>
Date: 2024-08-21 13:08:53
Also in: linux-ext4, linux-fsdevel, linux-xfs

On Wed, Aug 21, 2024 at 02:57:56PM +0200, Christoph Hellwig wrote:
On Wed, Aug 21, 2024 at 08:44:31AM -0400, Brian Foster wrote:
quoted
quoted
+	error = xfs_reflink_unshare(XFS_I(inode), offset, len);
+	if (error)
+		return error;
+
Doesn't unshare imply alloc?
Yes, ooks like that got lost and no test noticed it
quoted
quoted
-	if (xfs_file_sync_writes(file))
+	if (!error && xfs_file_sync_writes(file))
 		error = xfs_log_force_inode(ip);
I'd think if you hit -ENOSPC or something after doing a partial alloc to
a sync inode, you'd still want to flush the changes that were made..?
Persistence behavior on error is always undefined.  And that's also
what the current code does, as it jumps past the log force from all
error exits.
Ok, if this preserves existing behavior then I'm not too worried about
it. Thanks.

Brian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help