Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647715
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/6] ubifs: Maintain a parent pointer |
| Date | 2017-05-23 09:20 +0200 |
| Message-ID | <tKcgO-8mw-25@gated-at.bofh.it> (permalink) |
| References | <tJFEd-46j-3@gated-at.bofh.it> <tJFEe-46j-11@gated-at.bofh.it> <tJNip-IS-3@gated-at.bofh.it> <tJRcm-3bn-25@gated-at.bofh.it> <tK5oZ-3MF-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hyunchul, Am 23.05.2017 um 01:50 schrieb Hyunchul Lee: >> I assumed that the journal does this already because we change old_inode->i_ctime >> in this function too. >> But checking the code showed the opposite. >> So, if we face a power-cut the rename can succeed but we lose the ctime change. >> >> This needs to be addressed before we can add the parent pointer. > > Is writing old_inode->i_ctime required? I guess that it is needed only when > IS_SYNC(old_inode) is true, otherwise we don't need to guarantee that ctime > is synced. Well, rename() has to be an atomic operation. When UBIFS updates ctime during this operation it has also to be atomic. Otherwise, after a power-cut, you can end-up with a renamed file but a not updated ctime. Userspace can depend on this. Think of a backup program that needs to detect changes. It won't notice the renamed file. AFAICT POSIX does not require ctime to be updated during rename() but suggests it. My point is, either we do it always or never. Just checked xfs and btrfs. Both seem to update ctime of old_inode during the rename transaction. UBIFS should do the same. Thanks, //richard
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4/6] ubifs: Maintain a parent pointer Richard Weinberger <richard@nod.at> - 2017-05-21 22:30 +0200
Re: [PATCH 4/6] ubifs: Maintain a parent pointer Hyunchul Lee <hyc.lee@gmail.com> - 2017-05-22 06:40 +0200
Re: [PATCH 4/6] ubifs: Maintain a parent pointer Richard Weinberger <richard@nod.at> - 2017-05-22 10:50 +0200
Re: [PATCH 4/6] ubifs: Maintain a parent pointer Hyunchul Lee <hyc.lee@gmail.com> - 2017-05-23 02:00 +0200
Re: [PATCH 4/6] ubifs: Maintain a parent pointer Richard Weinberger <richard@nod.at> - 2017-05-23 09:20 +0200
Re: [PATCH 4/6] ubifs: Maintain a parent pointer Christoph Hellwig <hch@infradead.org> - 2017-05-23 10:40 +0200
Re: [PATCH 4/6] ubifs: Maintain a parent pointer Richard Weinberger <richard@nod.at> - 2017-05-23 10:50 +0200
csiph-web