Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646615

Re: [PATCH 4/6] ubifs: Maintain a parent pointer

From Richard Weinberger <richard@nod.at>
Newsgroups linux.kernel
Subject Re: [PATCH 4/6] ubifs: Maintain a parent pointer
Date 2017-05-22 10:50 +0200
Message-ID <tJRcm-3bn-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>
Organization linux.* mail to news gateway

Show all headers | View raw


Hyunchul,

Am 22.05.2017 um 06:30 schrieb Hyunchul Lee:
>> +	if (move)
>> +		old_inode_ui->parent_inum = new_dir->i_ino;
>> +
>>  	err = ubifs_jnl_rename(c, old_dir, old_inode, &old_nm, new_dir,
>>  			       new_inode, &new_nm, whiteout, sync);
> 
> I think that old_inode_ui->parent_inum could point old_dir, even though old_inode
> is a child of new_dir. this could happen that there is power-cut before
> old_inode is synced. so I guess that old_inode is needed to be written with
> rename's node group in ubifs_jnl_rename. is it right?

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.

Thanks,
//richard

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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