Skip to contentSkip to conversation

hfsplus: fix to update ctime after rename

PATCH Superseded Yangtao Li 5 participants 17 messages Apr 29, 2025 – May 15, 2025

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Yangtao Li

author maintainer
#0 lore raw

PATCH 1/2 hfsplus: fix to update ctime after rename

[BUG]

$ sudo ./check generic/003
FSTYP         -- hfsplus
PLATFORM      -- Linux/x86_64 graphic 6.8.0-58-generic #60~22.04.1-Ubuntu
MKFS_OPTIONS  -- /dev/loop29
MOUNT_OPTIONS -- /dev/loop29 /mnt/scratch

generic/003 - output mismatch
--- tests/generic/003.out 2025-04-27 08:49:39.876945323 -0600
+++ /home/graphic/fs/xfstests-dev/results//generic/003.out.bad

QA output created by 003
+ERROR: change time has not been updated after changing file1
Silence is golden
...

Ran: generic/003
Failures: generic/003
Failed 1 of 1 tests

[CAUSE]
change time has not been updated after changing file1

[FIX]
Update file ctime after rename in hfsplus_rename().

---
 fs/hfsplus/dir.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
fs/hfsplus/dir.c +8 -3
index 876bbb80fb4d..e77942440240 100644
@@ -534,6 +534,7 @@ static int hfsplus_rename(struct mnt_idmap *idmap,
 			  struct inode *new_dir, struct dentry *new_dentry,
 			  unsigned int flags)
 {
+	struct inode *inode = d_inode(old_dentry);
 	int res;
 
 	if (flags & ~RENAME_NOREPLACE)
@@ -552,9 +553,13 @@ static int hfsplus_rename(struct mnt_idmap *idmap,
 	res = hfsplus_rename_cat((u32)(unsigned long)old_dentry->d_fsdata,
 				 old_dir, &old_dentry->d_name,
 				 new_dir, &new_dentry->d_name);
-	if (!res)
-		new_dentry->d_fsdata = old_dentry->d_fsdata;
-	return res;
+	if (res)
+		return res;
+
+	new_dentry->d_fsdata = old_dentry->d_fsdata;
+	inode_set_ctime_current(inode);
+	mark_inode_dirty(inode);
+	return 0;
 }
 
 const struct inode_operations hfsplus_dir_inode_operations = {
Signature · 1 line
2.39.0
author maintainer
#1 lore raw

PATCH 2/2 hfs: fix to update ctime after rename

Similar to hfsplus, let's update file ctime after the rename operation in hfs_rename().

---
 fs/hfs/dir.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
fs/hfs/dir.c +10 -5
index 86a6b317b474..3b95bafb3f04 100644
@@ -284,6 +284,7 @@ static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 		      struct dentry *old_dentry, struct inode *new_dir,
 		      struct dentry *new_dentry, unsigned int flags)
 {
+	struct inode *inode = d_inode(old_dentry);
 	int res;
 
 	if (flags & ~RENAME_NOREPLACE)
@@ -299,11 +300,15 @@ static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 	res = hfs_cat_move(d_inode(old_dentry)->i_ino,
 			   old_dir, &old_dentry->d_name,
 			   new_dir, &new_dentry->d_name);
-	if (!res)
-		hfs_cat_build_key(old_dir->i_sb,
-				  (btree_key *)&HFS_I(d_inode(old_dentry))->cat_key,
-				  new_dir->i_ino, &new_dentry->d_name);
-	return res;
+	if (res)
+		return res;
+
+	hfs_cat_build_key(old_dir->i_sb,
+			  (btree_key *)&HFS_I(d_inode(old_dentry))->cat_key,
+			  new_dir->i_ino, &new_dentry->d_name);
+	inode_set_ctime_current(inode);
+	mark_inode_dirty(inode);
+	return 0;
 }
 
 const struct file_operations hfs_dir_operations = {
Signature · 1 line
2.39.0
#2 lore raw

Re: [PATCH 2/2] hfs: fix to update ctime after rename

Quoted 3 lines · Yangtao Li

Similar to hfsplus, let's update file ctime after the rename operation in hfs_rename().

It will be good to see which HFS test-case fails in the comment.

Quoted 27 lines
---
 fs/hfs/dir.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
fs/hfs/dir.c +2 -5
index 86a6b317b474..3b95bafb3f04 100644
@@ -284,6 +284,7 @@ static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 		      struct dentry *old_dentry, struct inode *new_dir,
 		      struct dentry *new_dentry, unsigned int flags)
 {
+	struct inode *inode = d_inode(old_dentry);
 	int res;
 
 	if (flags & ~RENAME_NOREPLACE)
@@ -299,11 +300,15 @@ static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 	res = hfs_cat_move(d_inode(old_dentry)->i_ino,
 			   old_dir, &old_dentry->d_name,
 			   new_dir, &new_dentry->d_name);
-	if (!res)
-		hfs_cat_build_key(old_dir->i_sb,
-				  (btree_key *)&HFS_I(d_inode(old_dentry))->cat_key,
-				  new_dir->i_ino, &new_dentry->d_name);
-	return res;
+	if (res)

fs/hfs/dir.c static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir, · line 313

Quoted 10 lines
fs/hfs/dir.c +8 -0
+		return res;
+
+	hfs_cat_build_key(old_dir->i_sb,
+			  (btree_key *)&HFS_I(d_inode(old_dentry))->cat_key,
+			  new_dir->i_ino, &new_dentry->d_name);
+	inode_set_ctime_current(inode);
+	mark_inode_dirty(inode);
+	return 0;
 }
 

Unfortunately, I cannot apply this patch too. Could you please prepare the patch for the latest kernel tree state?

Thanks,
Slava.

#3 lore raw

Re: [PATCH 2/2] hfs: fix to update ctime after rename

In reply to Yangtao Li
Quoted 31 lines · Yangtao Li

Similar to hfsplus, let's update file ctime after the rename operation in hfs_rename().

---
 fs/hfs/dir.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
fs/hfs/dir.c +3 -5
index 86a6b317b474..3b95bafb3f04 100644
@@ -284,6 +284,7 @@ static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 		      struct dentry *old_dentry, struct inode *new_dir,
 		      struct dentry *new_dentry, unsigned int flags)
 {
+	struct inode *inode = d_inode(old_dentry);
 	int res;
 
 	if (flags & ~RENAME_NOREPLACE)
@@ -299,11 +300,15 @@ static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
 	res = hfs_cat_move(d_inode(old_dentry)->i_ino,
 			   old_dir, &old_dentry->d_name,
 			   new_dir, &new_dentry->d_name);
-	if (!res)
-		hfs_cat_build_key(old_dir->i_sb,
-				  (btree_key *)&HFS_I(d_inode(old_dentry))->cat_key,
-				  new_dir->i_ino, &new_dentry->d_name);
-	return res;
+	if (res)
+		return res;

fs/hfs/dir.c static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir, · line 314

Quoted 10 lines
fs/hfs/dir.c +7 -0
+
+	hfs_cat_build_key(old_dir->i_sb,
+			  (btree_key *)&HFS_I(d_inode(old_dentry))->cat_key,
+			  new_dir->i_ino, &new_dentry->d_name);
+	inode_set_ctime_current(inode);
+	mark_inode_dirty(inode);
+	return 0;
 }
 
 const struct file_operations hfs_dir_operations = {

BEFORE PATCH:

uname -a
Linux hfsplus-testing-0001 6.15.0-rc4 #7 SMP PREEMPT_DYNAMIC Thu May 1 16:11:49 PDT 2025 x86_64 x86_64 x86_64 GNU/Linux

sudo ./check generic/003
FSTYP -- hfs
PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.15.0-rc4 #7 SMP
PREEMPT_DYNAMIC Thu May 1 16:11:49 PDT 2025
MKFS_OPTIONS -- /dev/loop51
MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch

generic/003 - output mismatch (see /home/slavad/XFSTESTS-2/xfstests-
dev/results//generic/003.out.bad)

    --- tests/generic/003.out	2025-04-24 12:48:45.886164335 -0700
    +++ /home/slavad/XFSTESTS-2/xfstests-

dev/results//generic/003.out.bad 2025-05-01 16:36:38.608591317 -0700
@@ -1,2 +1,6 @@
QA output created by 003
+ERROR: access time has changed for file1 after remount +ERROR: access time has changed after modifying file1
+ERROR: change time has not been updated after changing file1 +ERROR: access time has changed for file in read-only filesystem
Silence is golden
...
(Run 'diff -u /home/slavad/XFSTESTS-2/xfstests-dev/tests/generic/003.out
/home/slavad/XFSTESTS-2/xfstests-dev/results//generic/003.out.bad' to see the entire diff)
Ran: generic/003
Failures: generic/003
Failed 1 of 1 tests

WITH APPLIED PATCH:

uname -a
Linux hfsplus-testing-0001 6.15.0-rc4+ #8 SMP PREEMPT_DYNAMIC Thu May 1 16:43:22 PDT 2025 x86_64 x86_64 x86_64 GNU/Linux

sudo ./check generic/003
FSTYP -- hfs
PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.15.0-rc4+ #8 SMP
PREEMPT_DYNAMIC Thu May 1 16:43:22 PDT 2025
MKFS_OPTIONS -- /dev/loop51
MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch

generic/003 - output mismatch (see /home/slavad/XFSTESTS-2/xfstests-
dev/results//generic/003.out.bad)

    --- tests/generic/003.out	2025-04-24 12:48:45.886164335 -0700
    +++ /home/slavad/XFSTESTS-2/xfstests-

dev/results//generic/003.out.bad 2025-05-01 16:53:56.628734257 -0700
@@ -1,2 +1,5 @@
QA output created by 003
+ERROR: access time has changed for file1 after remount +ERROR: access time has changed after modifying file1
+ERROR: access time has changed for file in read-only filesystem
Silence is golden
...
(Run 'diff -u /home/slavad/XFSTESTS-2/xfstests-dev/tests/generic/003.out
/home/slavad/XFSTESTS-2/xfstests-dev/results//generic/003.out.bad' to see the entire diff)
Ran: generic/003
Failures: generic/003
Failed 1 of 1 tests

It looks like that it is not the whole fix of the issue for HFS case.

Thanks,
Slava.

author maintainer
#4 lore raw

回复: [PATCH 2/2] hfs: fix to update ctime after rename

Hi Slava,

Quoted 5 lines

+ERROR: access time has changed for file1 after remount +ERROR: access time has changed after modifying file1 +ERROR: access time has changed for file in read-only filesystem

It looks like that it is not the whole fix of the issue for HFS case.

The test cases that failed after applying this patch are all related to the atime not being updated, but hfs actually does not have atime.

So the current fix is ​​sufficient, should we modify the 003 test case?

   dirCrDat:      LongInt;    {date and time of creation}
   dirMdDat:      LongInt;    {date and time of last modification}
   dirBkDat:      LongInt;    {date and time of last backup}
   filCrDat:      LongInt;    {date and time of creation}
   filMdDat:      LongInt;    {date and time of last modification}
   filBkDat:      LongInt;    {date and time of last backup}

Thanks,
Yangtao

#5 lore raw

Re: 回复: [PATCH 2/2] hfs: fix to update ctime after rename

Quoted 11 lines · 李扬韬

Hi Slava,

Quoted 6 lines

   +ERROR: access time has changed for file1 after remount +ERROR: access time has changed after modifying file1 +ERROR: access time has changed for file in read-only filesystem

It looks like that it is not the whole fix of the issue for HFS case.

The test cases that failed after applying this patch are all related to the atime not being updated,

If I understood correctly "ERROR: access time has changed for file1 after remount" means atime has been changed.

Quoted 2 lines

but hfs actually does not have atime.

But how the test detects that atime has been updated? If HFS hasn't atime, then test cannot detect such update, from my point of view.

Quoted 3 lines

So the current fix is ​​sufficient, should we modify the 003 test case?

I don't think so. Probably, something is wrong in HFS code. We need to double check it.

Thanks,
Slava.

Quoted 10 lines

   dirCrDat:      LongInt;    {date and time of creation} dirMdDat:      LongInt;    {date and time of last modification} dirBkDat:      LongInt;    {date and time of last backup}

   filCrDat:      LongInt;    {date and time of creation} filMdDat:      LongInt;    {date and time of last modification} filBkDat:      LongInt;    {date and time of last backup}

Thanks,
Yangtao

#6 lore raw

Re: 回复: [PATCH 2/2] hfs: fix to update ctime after rename

Quoted 15 lines · Viacheslav Dubeyko
Quoted 7 lines · 李扬韬

Hi Slava,

Quoted 4 lines

   +ERROR: access time has changed for file1 after remount +ERROR: access time has changed after modifying file1 +ERROR: access time has changed for file in read-only filesystem

Quoted 6 lines
Quoted 2 lines

It looks like that it is not the whole fix of the issue for HFS case.

The test cases that failed after applying this patch are all related
to the atime not being updated,

Quoted 9 lines

If I understood correctly "ERROR: access time has changed for file1 after remount" means atime has been changed.

Quoted 2 lines

but hfs actually does not have atime.

But how the test detects that atime has been updated? If HFS hasn't atime, then test cannot detect such update, from my point of view.

As far as I can see, HFS code operates by atime [1 - 3]. As a result, generic_fillattr [4] can retrieve the atime value. If we don't store atime in the on-disk metadata, then the test could see inconsistent atime value. I believe that dirMdDat/filMdDat (mtime) needs to be considered as atime too. Because, modification cannot be done without access action. So, atime == mtime.

Thanks,
Slava.

Quoted 4 lines
Quoted 3 lines

So the current fix is ​​sufficient, should we modify the 003 test case?

Quoted 17 lines

I don't think so. Probably, something is wrong in HFS code. We need to
double check it.

Thanks,
Slava.

Quoted 10 lines

   dirCrDat:      LongInt;    {date and time of creation} dirMdDat:      LongInt;    {date and time of last modification} dirBkDat:      LongInt;    {date and time of last backup}

   filCrDat:      LongInt;    {date and time of creation} filMdDat:      LongInt;    {date and time of last modification} filBkDat:      LongInt;    {date and time of last backup}

Thanks,
Yangtao

[1] https://elixir.bootlin.com/linux/v6.12.6/source/fs/hfs/sysdep.c#L35
[2] https://elixir.bootlin.com/linux/v6.12.6/source/fs/hfs/inode.c#L356
[3] https://elixir.bootlin.com/linux/v6.12.6/source/fs/hfs/inode.c#L367
[4] https://elixir.bootlin.com/linux/v6.12.6/source/fs/stat.c#L60

author maintainer
#7 lore raw

回复: 回复: [PATCH 2/2] hfs: fix to update ctime after rename

In reply to Viacheslav Dubeyko

Hi Slava,

Quoted 1 line

If I understood correctly "ERROR: access time has changed for file1 after remount" means atime has been changed.

In fact, it seems that it is not the atime that has been changed, but the disk atime that has been not changed.
The inode in memory has a newer atime, but the atime is not updated to the disk when write_inode is executed(hfs has no atime in disk format).

For ERROR: access time has changed for file1 after remount

Before:

	Access:  2025-05-09 14:05:40
	Modify:  2025-05-09 14:05:38
	Change:  2025-05-09 14:05:38

After umount&mount:

	Access:  2025-05-09 14:05:38		<-- back to mtime
	Modify:  2025-05-09 14:05:38
	Change:  2025-05-09 14:05:38

So we get inconsistent results for atime.

Am I missing something?

Thx,
Yangtao

#8 lore raw

Re: 回复: 回复: [PATCH 2/2] hfs: fix to update ctime after rename

Quoted 18 lines · 李扬韬

Hi Slava,

Quoted 2 lines

If I understood correctly "ERROR: access time has changed for file1 after remount" means atime has been changed.

In fact, it seems that it is not the atime that has been changed, but the disk atime that has been not changed.
The inode in memory has a newer atime, but the atime is not updated to the disk when write_inode is executed(hfs has no atime in disk format).

For ERROR: access time has changed for file1 after remount

Before:

	Access:  2025-05-09 14:05:40
	Modify:  2025-05-09 14:05:38
	Change:  2025-05-09 14:05:38
Quoted 9 lines

After umount&mount:

	Access:  2025-05-09 14:05:38		<-- back to mtime
	Modify:  2025-05-09 14:05:38
	Change:  2025-05-09 14:05:38

So we get inconsistent results for atime.

Am I missing something?

This is was my point. We need to make the access time (atime) always the same as the modification time (mtime) because we cannot save the atime on disk. This is what I meant by atime == mtime. And this atime change is happening in HFS driver logic that needs to be corrected.

Thanks,
Slava.

#9 lore raw
In reply to Yangtao Li
Quoted 36 lines · Yangtao Li

[BUG]

$ sudo ./check generic/003
FSTYP         -- hfsplus
PLATFORM      -- Linux/x86_64 graphic 6.8.0-58-generic #60~22.04.1-Ubuntu
MKFS_OPTIONS  -- /dev/loop29
MOUNT_OPTIONS -- /dev/loop29 /mnt/scratch

generic/003 - output mismatch
--- tests/generic/003.out 2025-04-27 08:49:39.876945323 -0600
+++ /home/graphic/fs/xfstests-dev/results//generic/003.out.bad

QA output created by 003
+ERROR: change time has not been updated after changing file1
Silence is golden
...

Ran: generic/003
Failures: generic/003
Failed 1 of 1 tests

[CAUSE]
change time has not been updated after changing file1

[FIX]
Update file ctime after rename in hfsplus_rename().

---
 fs/hfsplus/dir.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
fs/hfsplus/dir.c +0 -0
index 876bbb80fb4d..e77942440240 100644

fs/hfsplus/dir.c static int hfsplus_rename(struct mnt_idmap *idmap, · line 536

Quoted 3 lines
fs/hfsplus/dir.c +0 -0
@@ -534,6 +534,7 @@ static int hfsplus_rename(struct mnt_idmap *idmap,
 			  struct inode *new_dir, struct dentry *new_dentry,
 			  unsigned int flags)
 {

Unfortunately, I am unable to apply you patch. In 6.15-rc4 we have already:

static int hfsplus_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry, unsigned int flags)

Could you please prepare the patch for latest state of the kernel tree?

Thanks,
Slava.

author maintainer
#10 lore raw

Hi Slava,

Quoted 1 line

Unfortunately, I am unable to apply you patch. In 6.15-rc4 we have already:

Why can't apply?

Quoted 1 line

Could you please prepare the patch for latest state of the kernel tree?

In fact, I applied these two patches to 6.15-rc4, and there were no abnormalities. based on commit 4f79eaa2ceac86a0e0f304b0bab556cca5bf4f30

Thanks,
Yangtao

#11 lore raw

Hi Yangtao,

Quoted 11 lines · 李扬韬

Hi Slava,

Quoted 1 line

Unfortunately, I am unable to apply you patch. In 6.15-rc4 we have already:

Why can't apply?

Quoted 1 line

Could you please prepare the patch for latest state of the kernel tree?

In fact, I applied these two patches to 6.15-rc4, and there were no abnormalities. based on commit 4f79eaa2ceac86a0e0f304b0bab556cca5bf4f30

It's strange. The 'git apply' doesn't work, but 'git am' does work.

git apply -v ./\[EXTERNAL\]\ \[PATCH\ 1_2\]\ hfsplus\:\ fix\ to\ update\ ctime\
after\ rename.mbox
Checking patch fs/hfsplus/dir.c...
error: while searching for:
struct inode *new_dir, struct dentry *new_dentry,? unsigned int flags)?
{?
int res;?
?
if (flags & ~RENAME_NOREPLACE)?

error: patch failed: fs/hfsplus/dir.c:534
error: fs/hfsplus/dir.c: patch does not apply

git am ./\[EXTERNAL\]\ \[PATCH\ 1_2\]\ hfsplus\:\ fix\ to\ update\ ctime\ after\
rename.mbox
Applying: hfsplus: fix to update ctime after rename

Does 'git apply' works on your side if you try to apply the patch from email? Is it some glitch on my side? As far as I can see, I am trying to apply on clean kernel tree.

Thanks,
Slava.

#12 lore raw

Hi Slava,

Quoted 29 lines · Viacheslav Dubeyko
Quoted 11 lines · 李扬韬

Hi Slava,

Quoted 1 line

Unfortunately, I am unable to apply you patch. In 6.15-rc4 we have already:

Why can't apply?

Quoted 1 line

Could you please prepare the patch for latest state of the kernel tree?

In fact, I applied these two patches to 6.15-rc4, and there were no abnormalities. based on commit 4f79eaa2ceac86a0e0f304b0bab556cca5bf4f30

It's strange. The 'git apply' doesn't work, but 'git am' does work.

git apply -v ./\[EXTERNAL\]\ \[PATCH\ 1_2\]\ hfsplus\:\ fix\ to\ update\ ctime\
after\ rename.mbox
Checking patch fs/hfsplus/dir.c...
error: while searching for:
struct inode *new_dir, struct dentry *new_dentry,? unsigned int flags)?
{?
int res;?
?
if (flags & ~RENAME_NOREPLACE)?

error: patch failed: fs/hfsplus/dir.c:534
error: fs/hfsplus/dir.c: patch does not apply

Quoted 7 lines

git am ./\[EXTERNAL\]\ \[PATCH\ 1_2\]\ hfsplus\:\ fix\ to\ update\ ctime\ after\
rename.mbox
Applying: hfsplus: fix to update ctime after rename

Does 'git apply' works on your side if you try to apply the patch from email? Is it some glitch on my side? As far as I can see, I am trying to apply on clean kernel tree.

git-apply is for applying plain patches while git-am is for patches from mailboxes.

I would suggest to always use git-am after fetching patches using "b4 am <MSGID>" from the kernel mailing list.

Please note that when you apply patches with git-am, you should always use the "-s" option so that the patches are automatically signed-off with your own email address.

Btw, can you push your tree somewhere until you've got your kernel.org account?

Thanks,
Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#13 lore raw
Quoted 3 lines · John Paul Adrian Glaubitz

Hi Slava,

<skipped>

Quoted 5 lines
Quoted 4 lines

Does 'git apply' works on your side if you try to apply the patch from email? Is it some glitch on my side? As far as I can see, I am trying to apply on clean kernel tree.

Quoted 8 lines

git-apply is for applying plain patches while git-am is for patches from mailboxes.

I would suggest to always use git-am after fetching patches using "b4 am <MSGID>" from the kernel mailing list.

Please note that when you apply patches with git-am, you should always use the "-s" option so that the patches are automatically signed-off with your own email address.

Sorry, my glitch. :)

Quoted 2 lines

Btw, can you push your tree somewhere until you've got your kernel.org account?

Do we really need to create some temporary tree? I have a fork of kernel tree on github where I am managing SSDFS source code. But I am not sure that I can create another fork of kernel tree on github.

Thanks,
Slava.

#14 lore raw
Quoted 3 lines · Viacheslav Dubeyko
Quoted 3 lines

Please note that when you apply patches with git-am, you should always use the "-s" option so that the patches are automatically signed-off with your own email address.

Pro tip: If you are using "b4 am" to download patches from lore.kernel.org, use the -c option, e.g., "b4 am -c [msgid]". This will automatically check to make sure the patches have valid DKIM headers, etc. and will also check to see if there is a newer version of the patch series on lore.kernel.org and download it instead.

Another cool command is "b4 shazaam"; see the b4 man page for more details.

Quoted 6 lines
Quoted 2 lines

Btw, can you push your tree somewhere until you've got your kernel.org account?

Do we really need to create some temporary tree? I have a fork of kernel tree on github where I am managing SSDFS source code. But I am not sure that I can create another fork of kernel tree on github.

If you have a fork of the kernel tree, sure, you can just use that and tell folks what branch they should look at.

Github should be just fine creating another fork of the kernel tree, however. One advantage of having separate forks is that once you set up the kernel.org tree from your local git tree, it becomes easier to update multiple trees via separate git trees. So for example, when I push out changes, I might do

git push ra # ra.kernel.org is a CNAME for gitolite.kernel.org

                # and is easier to type.   :-)
git push github

... and this will update my trees on kernel.org and github automatically, aince I have in my .git/config file:

[remote "ra"]
url = ssh://[email protected]/pub/scm/linux/kernel/git/tytso/ext4.git fetch = +refs/heads/*:refs/remotes/ext4/*
push = +master:master
push = +origin:origin
push = +fixes:fixes
push = +dev:dev
push = +test:test

[remote "github"]
url = [email protected]:tytso/ext4.git fetch = +refs/heads/*:refs/remotes/github/* push = +master:master
push = +origin:origin
push = +fixes:fixes
push = +dev:dev
push = +test:test

Cheers,

- Ted

#15 lore raw
Quoted 2 lines · Theodore Ts'o
Quoted 1 line · Viacheslav Dubeyko
Quoted 1 line

<skipped>

Quoted 33 lines
Quoted 7 lines
Quoted 3 lines

Btw, can you push your tree somewhere until you've got your kernel.org account?

Do we really need to create some temporary tree? I have a fork of kernel tree on github where I am managing SSDFS source code. But I am not sure that I can create another fork of kernel tree on github.

If you have a fork of the kernel tree, sure, you can just use that and tell folks what branch they should look at.

Github should be just fine creating another fork of the kernel tree, however. One advantage of having separate forks is that once you set up the kernel.org tree from your local git tree, it becomes easier to update multiple trees via separate git trees. So for example, when I push out changes, I might do

git push ra # ra.kernel.org is a CNAME for gitolite.kernel.org

                # and is easier to type.   :-)
git push github

... and this will update my trees on kernel.org and github automatically, aince I have in my .git/config file:

[remote "ra"]
url = ssh://[email protected]/pub/scm/linux/kernel/git/tytso/ext4.git fetch = +refs/heads/*:refs/remotes/ext4/*
push = +master:master
push = +origin:origin
push = +fixes:fixes
push = +dev:dev
push = +test:test

Quoted 9 lines

[remote "github"]
url = [email protected]:tytso/ext4.git fetch = +refs/heads/*:refs/remotes/github/* push = +master:master
push = +origin:origin
push = +fixes:fixes
push = +dev:dev
push = +test:test

Makes sense! Thank you for sharing these details. :)

Adrian, Yangtao,

I've created a hfs-linux-kernel organization [1] on GitHub and I've sent invitation to both of you. I've made the kernel tree fork [2] and I've started of collecting the known HFS/HFS+ issues [3]. So, we can take and assign the issue(s) there. Also, we could have a WiKi there too [4].

So, we are preparing the environment step by step. :)

Thanks,
Slava.

[1] https://github.com/hfs-linux-kernel
[2] https://github.com/hfs-linux-kernel/hfs-linux-kernel
[3] https://github.com/hfs-linux-kernel/hfs-linux-kernel/issues/
[4] https://github.com/hfs-linux-kernel/hfs-linux-kernel/wiki

Tested-by Reviewed-by on v1 1/2
#16 lore raw
In reply to Yangtao Li
Quoted 50 lines · Yangtao Li

[BUG]

$ sudo ./check generic/003
FSTYP         -- hfsplus
PLATFORM      -- Linux/x86_64 graphic 6.8.0-58-generic #60~22.04.1-Ubuntu
MKFS_OPTIONS  -- /dev/loop29
MOUNT_OPTIONS -- /dev/loop29 /mnt/scratch

generic/003 - output mismatch
--- tests/generic/003.out 2025-04-27 08:49:39.876945323 -0600
+++ /home/graphic/fs/xfstests-dev/results//generic/003.out.bad

QA output created by 003
+ERROR: change time has not been updated after changing file1
Silence is golden
...

Ran: generic/003
Failures: generic/003
Failed 1 of 1 tests

[CAUSE]
change time has not been updated after changing file1

[FIX]
Update file ctime after rename in hfsplus_rename().

---
 fs/hfsplus/dir.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
fs/hfsplus/dir.c +1 -3
index 876bbb80fb4d..e77942440240 100644
@@ -534,6 +534,7 @@ static int hfsplus_rename(struct mnt_idmap *idmap,
 			  struct inode *new_dir, struct dentry *new_dentry,
 			  unsigned int flags)
 {
+	struct inode *inode = d_inode(old_dentry);
 	int res;
 
 	if (flags & ~RENAME_NOREPLACE)
@@ -552,9 +553,13 @@ static int hfsplus_rename(struct mnt_idmap *idmap,
 	res = hfsplus_rename_cat((u32)(unsigned long)old_dentry->d_fsdata,
 				 old_dir, &old_dentry->d_name,
 				 new_dir, &new_dentry->d_name);
-	if (!res)
-		new_dentry->d_fsdata = old_dentry->d_fsdata;
-	return res;

fs/hfsplus/dir.c static int hfsplus_rename(struct mnt_idmap *idmap, · line 565

Quoted 10 lines
fs/hfsplus/dir.c +7 -0
+	if (res)
+		return res;
+
+	new_dentry->d_fsdata = old_dentry->d_fsdata;
+	inode_set_ctime_current(inode);
+	mark_inode_dirty(inode);
+	return 0;
 }
 
 const struct inode_operations hfsplus_dir_inode_operations = {

BEFORE PATCH:

sudo ./check generic/003
FSTYP -- hfsplus
PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.15.0-rc4 #7 SMP
PREEMPT_DYNAMIC Thu May 1 16:11:49 PDT 2025
MKFS_OPTIONS -- /dev/loop51
MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch

generic/003 - output mismatch (see /home/slavad/XFSTESTS-2/xfstests-
dev/results//generic/003.out.bad)

    --- tests/generic/003.out	2025-04-24 12:48:45.886164335 -0700
    +++ /home/slavad/XFSTESTS-2/xfstests-

dev/results//generic/003.out.bad 2025-05-01 16:42:51.220196434 -0700
@@ -1,2 +1,3 @@
QA output created by 003
+ERROR: change time has not been updated after changing file1
Silence is golden
...
(Run 'diff -u /home/slavad/XFSTESTS-2/xfstests-dev/tests/generic/003.out
/home/slavad/XFSTESTS-2/xfstests-dev/results//generic/003.out.bad' to see the entire diff)
Ran: generic/003
Failures: generic/003
Failed 1 of 1 tests

WITH APPLIED PATCH:

sudo ./check generic/003
FSTYP -- hfsplus
PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.15.0-rc4+ #8 SMP
PREEMPT_DYNAMIC Thu May 1 16:43:22 PDT 2025
MKFS_OPTIONS -- /dev/loop51
MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch

generic/003 35s
Ran: generic/003
Passed all 1 tests

Thanks,
Slava.