From: Ariel Miculas <ariel.miculas@gmail.com>
To: linux-bcachefs@vger.kernel.org
Cc: Ariel Miculas <ariel.miculas@gmail.com>
Subject: [PATCH v2 4/4] Preserve directory {a,m,c} times by calling copy_times() after the recursion
Date: Fri, 14 Jun 2024 21:46:53 +0300 [thread overview]
Message-ID: <20240614184653.276043-4-ariel.miculas@gmail.com> (raw)
In-Reply-To: <20240614184653.276043-1-ariel.miculas@gmail.com>
Otherwise the directory {a,m,c} times will be modified by the recursive
copy of the directory tree.
Signed-off-by: Ariel Miculas <ariel.miculas@gmail.com>
---
c_src/posix_to_bcachefs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c_src/posix_to_bcachefs.c b/c_src/posix_to_bcachefs.c
index c66b9734..714eb47d 100644
--- a/c_src/posix_to_bcachefs.c
+++ b/c_src/posix_to_bcachefs.c
@@ -360,7 +360,6 @@ static void copy_dir(struct copy_fs_state *s,
if (dst_inum)
*dst_inum = inode.bi_inum;
- copy_times(c, &inode, &stat);
copy_xattrs(c, &inode, d->d_name);
/* copy xattrs */
@@ -395,6 +394,7 @@ static void copy_dir(struct copy_fs_state *s,
BUG();
}
+ copy_times(c, &inode, &stat);
update_inode(c, &inode);
next:
free(child_path);
--
2.34.1
prev parent reply other threads:[~2024-06-14 18:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 18:46 [PATCH v2 1/4] bcachefs: allow initializing a bcachefs filesystem from a source directory Ariel Miculas
2024-06-14 18:46 ` [PATCH v2 2/4] Fix performance regression of update_inode Ariel Miculas
2024-06-14 18:46 ` [PATCH v2 3/4] Fix incomplete file copy due to copy_data misuse Ariel Miculas
2024-06-14 18:46 ` Ariel Miculas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240614184653.276043-4-ariel.miculas@gmail.com \
--to=ariel.miculas@gmail.com \
--cc=linux-bcachefs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox