Skip to contentSkip to conversation

fat: revise the FAT patches for mgtime series

PATCH Applied Jeff Layton 5 participants 11 messages Aug 10, 2023 – Aug 11, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover fat: revise the FAT patches for mgtime series

This is a respin of just the FAT patches for the multigrain ctime series. It's based on top of Christian's vfs.ctime branch, with this patch reverted:

89b39bea91c4 fat: make fat_update_time get its own timestamp

Christian, let me know if you'd rather I resend the whole series.

To: Christian Brauner <[email protected]>
To: OGAWA Hirofumi <[email protected]>
To: Frank Sorenson <[email protected]>
To: Jan Kara <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
Jeff Layton (2):
fat: remove i_version handling from fat_update_time
fat: make fat_update_time get its own timestamp

 fs/fat/misc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

---
base-commit: bae85436bd3cca48ba625d0caf7457fe7708c336
change-id: 20230810-ctime-fat-e4be14feb165

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>
#1 lore raw

PATCH 1/2 fat: remove i_version handling from fat_update_time

commit 6bb885ecd746 (fat: add functions to update and truncate timestamps appropriately") added an update_time routine for fat. That patch added a section for handling the S_VERSION bit, even though FAT doesn't enable SB_I_VERSION and the S_VERSION bit will never be set when calling it.

Remove the section for handling S_VERSION since it's effectively dead code, and will be problematic vs. future changes.

Cc Frank Sorenson <[email protected]>
---
 fs/fat/misc.c | 3 ---
 1 file changed, 3 deletions(-)
fs/fat/misc.c +0 -3
index ab28173348fa..37f4afb346af 100644
@@ -354,9 +354,6 @@ int fat_update_time(struct inode *inode, int flags)
 			dirty_flags |= I_DIRTY_SYNC;
 	}
 
-	if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false))
-		dirty_flags |= I_DIRTY_SYNC;
-
 	__mark_inode_dirty(inode, dirty_flags);
 	return 0;
 }
Signature · 1 line
2.41.0
reviewer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] fat: remove i_version handling from fat_update_time

Quoted 11 lines · Jeff Layton

commit 6bb885ecd746 (fat: add functions to update and truncate timestamps appropriately") added an update_time routine for fat. That patch added a section for handling the S_VERSION bit, even though FAT doesn't enable SB_I_VERSION and the S_VERSION bit will never be set when calling it.

Remove the section for handling S_VERSION since it's effectively dead code, and will be problematic vs. future changes.

Cc Frank Sorenson <[email protected]>

Looks good. Feel free to add:

Honza

Quoted 22 lines
---
 fs/fat/misc.c | 3 ---
 1 file changed, 3 deletions(-)
fs/fat/misc.c +0 -3
index ab28173348fa..37f4afb346af 100644
@@ -354,9 +354,6 @@ int fat_update_time(struct inode *inode, int flags)
 			dirty_flags |= I_DIRTY_SYNC;
 	}
 
-	if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false))
-		dirty_flags |= I_DIRTY_SYNC;
-
 	__mark_inode_dirty(inode, dirty_flags);
 	return 0;
 }
Signature · 2 lines
-- 
2.41.0
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
maintainer Acked-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] fat: remove i_version handling from fat_update_time

In reply to Jeff Layton
Quoted 11 lines · Jeff Layton

commit 6bb885ecd746 (fat: add functions to update and truncate timestamps appropriately") added an update_time routine for fat. That patch added a section for handling the S_VERSION bit, even though FAT doesn't enable SB_I_VERSION and the S_VERSION bit will never be set when calling it.

Remove the section for handling S_VERSION since it's effectively dead code, and will be problematic vs. future changes.

Cc Frank Sorenson <[email protected]>

Thanks.

Quoted 18 lines
---
 fs/fat/misc.c | 3 ---
 1 file changed, 3 deletions(-)
fs/fat/misc.c +0 -3
index ab28173348fa..37f4afb346af 100644
@@ -354,9 +354,6 @@ int fat_update_time(struct inode *inode, int flags)
 			dirty_flags |= I_DIRTY_SYNC;
 	}
 
-	if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false))
-		dirty_flags |= I_DIRTY_SYNC;
-
 	__mark_inode_dirty(inode, dirty_flags);
 	return 0;
 }
Signature · 1 line
OGAWA Hirofumi <[email protected]>
Reviewed-by on v1 1/2
#4 lore raw

Re: [PATCH 1/2] fat: remove i_version handling from fat_update_time

In reply to Jeff Layton
Quoted 6 lines · Jeff Layton

commit 6bb885ecd746 (fat: add functions to update and truncate timestamps appropriately") added an update_time routine for fat. That patch added a section for handling the S_VERSION bit, even though FAT doesn't enable SB_I_VERSION and the S_VERSION bit will never be set when calling it.

Quoted 6 lines

Remove the section for handling S_VERSION since it's effectively dead code, and will be problematic vs. future changes.

Cc Frank Sorenson <[email protected]>

---

Quoted 18 lines
  fs/fat/misc.c | 3 ---
  1 file changed, 3 deletions(-)
fs/fat/misc.c +0 -3
index ab28173348fa..37f4afb346af 100644
@@ -354,9 +354,6 @@ int fat_update_time(struct inode *inode, int flags)
  			dirty_flags |= I_DIRTY_SYNC;
  	}
 
-	if ((flags & S_VERSION) && inode_maybe_inc_iversion(inode, false))
-		dirty_flags |= I_DIRTY_SYNC;
-
  	__mark_inode_dirty(inode, dirty_flags);
  	return 0;
  }
#5 lore raw

PATCH 2/2 fat: make fat_update_time get its own timestamp

In reply to Jeff Layton

In later patches, we're going to drop the "now" parameter from the update_time operation. Fix fat_update_time to fetch its own timestamp. It turns out that this is easily done by just passing a NULL timestamp pointer to fat_truncate_time.

---
 fs/fat/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fat/misc.c +1 -1
index 37f4afb346af..f2304a1054aa 100644
@@ -347,7 +347,7 @@ int fat_update_time(struct inode *inode, int flags)
 		return 0;
 
 	if (flags & (S_ATIME | S_CTIME | S_MTIME)) {
-		fat_truncate_time(inode, now, flags);
+		fat_truncate_time(inode, NULL, flags);
 		if (inode->i_sb->s_flags & SB_LAZYTIME)
 			dirty_flags |= I_DIRTY_TIME;
 		else
Signature · 1 line
2.41.0
reviewer Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] fat: make fat_update_time get its own timestamp

Quoted 6 lines · Jeff Layton

In later patches, we're going to drop the "now" parameter from the update_time operation. Fix fat_update_time to fetch its own timestamp. It turns out that this is easily done by just passing a NULL timestamp pointer to fat_truncate_time.

Looks good. Feel free to add:

Honza

Quoted 21 lines
---
 fs/fat/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fat/misc.c +1 -1
index 37f4afb346af..f2304a1054aa 100644
@@ -347,7 +347,7 @@ int fat_update_time(struct inode *inode, int flags)
 		return 0;
 
 	if (flags & (S_ATIME | S_CTIME | S_MTIME)) {
-		fat_truncate_time(inode, now, flags);
+		fat_truncate_time(inode, NULL, flags);
 		if (inode->i_sb->s_flags & SB_LAZYTIME)
 			dirty_flags |= I_DIRTY_TIME;
 		else
Signature · 2 lines
-- 
2.41.0
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
maintainer Acked-by on v1 2/2
#7 lore raw

Re: [PATCH 2/2] fat: make fat_update_time get its own timestamp

In reply to Jeff Layton
Quoted 6 lines · Jeff Layton

In later patches, we're going to drop the "now" parameter from the update_time operation. Fix fat_update_time to fetch its own timestamp. It turns out that this is easily done by just passing a NULL timestamp pointer to fat_truncate_time.

Thanks.

Quoted 17 lines
---
 fs/fat/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fat/misc.c +1 -1
index 37f4afb346af..f2304a1054aa 100644
@@ -347,7 +347,7 @@ int fat_update_time(struct inode *inode, int flags)
 		return 0;
 
 	if (flags & (S_ATIME | S_CTIME | S_MTIME)) {
-		fat_truncate_time(inode, now, flags);
+		fat_truncate_time(inode, NULL, flags);
 		if (inode->i_sb->s_flags & SB_LAZYTIME)
 			dirty_flags |= I_DIRTY_TIME;
 		else
Signature · 1 line
OGAWA Hirofumi <[email protected]>
Reviewed-by on v1 2/2
#8 lore raw

Re: [PATCH 2/2] fat: make fat_update_time get its own timestamp

In reply to Jeff Layton
Quoted 7 lines · Jeff Layton

In later patches, we're going to drop the "now" parameter from the update_time operation. Fix fat_update_time to fetch its own timestamp. It turns out that this is easily done by just passing a NULL timestamp pointer to fat_truncate_time.

---

Quoted 16 lines
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/fat/misc.c +1 -1
index 37f4afb346af..f2304a1054aa 100644
@@ -347,7 +347,7 @@ int fat_update_time(struct inode *inode, int flags)
  		return 0;
 
  	if (flags & (S_ATIME | S_CTIME | S_MTIME)) {
-		fat_truncate_time(inode, now, flags);
+		fat_truncate_time(inode, NULL, flags);
  		if (inode->i_sb->s_flags & SB_LAZYTIME)
  			dirty_flags |= I_DIRTY_TIME;
  		else
#9 lore raw
In reply to Jeff Layton
Quoted 7 lines · Jeff Layton

This is a respin of just the FAT patches for the multigrain ctime series. It's based on top of Christian's vfs.ctime branch, with this patch reverted:

89b39bea91c4 fat: make fat_update_time get its own timestamp

Christian, let me know if you'd rather I resend the whole series.

Nono, that's fine as is. Thanks for taking care of all the fixups!

maintainer Applied
#10 lore raw
In reply to Jeff Layton
Quoted 9 lines · Jeff Layton

This is a respin of just the FAT patches for the multigrain ctime series. It's based on top of Christian's vfs.ctime branch, with this patch reverted:

89b39bea91c4 fat: make fat_update_time get its own timestamp

Christian, let me know if you'd rather I resend the whole series.

[...]

I simply dropped the old fat patch and applied these two instead. I've rebased them so their in the same position as the old patch so the series is still logically ordered.

---

Applied to the vfs.ctime branch of the vfs/vfs.git tree. Patches in the vfs.ctime branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.ctime

[1/2] fat: remove i_version handling from fat_update_time

      https://git.kernel.org/vfs/vfs/c/93e6c3043544
[2/2] fat: make fat_update_time get its own timestamp
      https://git.kernel.org/vfs/vfs/c/6f4aaee3faa8