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

2017-05-23 Thread Richard Weinberger
Christoph, Am 23.05.2017 um 10:37 schrieb Christoph Hellwig: > On Sun, May 21, 2017 at 10:20:49PM +0200, Richard Weinberger wrote: >> The new feature UBIFS_FLG_PARENTPOINTER allows looking >> up the parent. Usually the Linux VFS walks down the filesystem >> and no parent pointers are needed. But w

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

2017-05-23 Thread Christoph Hellwig
On Sun, May 21, 2017 at 10:20:49PM +0200, Richard Weinberger wrote: > The new feature UBIFS_FLG_PARENTPOINTER allows looking > up the parent. Usually the Linux VFS walks down the filesystem > and no parent pointers are needed. But when a filesystem > is exportable via NFS such a lookup is needed. >

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

2017-05-23 Thread Richard Weinberger
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 >> chan

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

2017-05-22 Thread Hyunchul Lee
Hi Richard, On Mon, May 22, 2017 at 10:45:08AM +0200, Richard Weinberger wrote: > 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,

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

2017-05-22 Thread Richard Weinberger
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 ol

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

2017-05-21 Thread Hyunchul Lee
Hi Richard, On Sun, May 21, 2017 at 10:20:49PM +0200, Richard Weinberger wrote: > The new feature UBIFS_FLG_PARENTPOINTER allows looking > up the parent. Usually the Linux VFS walks down the filesystem > and no parent pointers are needed. But when a filesystem > is exportable via NFS such a lookup

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

2017-05-21 Thread Richard Weinberger
The new feature UBIFS_FLG_PARENTPOINTER allows looking up the parent. Usually the Linux VFS walks down the filesystem and no parent pointers are needed. But when a filesystem is exportable via NFS such a lookup is needed. We can use a padding field in struct ubifs_ino_node to maintain a pointer to

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

2017-04-28 Thread Richard Weinberger
Hyunchul, Am 28.04.2017 um 10:31 schrieb Hyunchul Lee: > I guess that dir->i_ino should be assigned to ui->parent_inum. Uff, right. It is obvious that I did this series in a hurry. :D Thanks, //richard

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

2017-04-28 Thread Hyunchul Lee
Hi Richard I found a mistake in this patch. On Thu, Dec 01, 2016 at 11:02:19PM +0100, Richard Weinberger wrote: > The new feature UBIFS_FLG_PARENTPOINTER allows looking > up the parent. Usually the Linux VFS walks down the filesystem > and no parent pointers are needed. But when a filesystem > is

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

2016-12-02 Thread Richard Weinberger
On 02.12.2016 10:28, Marcus Folkesson wrote: > On Thu, Dec 01, 2016 at 11:02:19PM +0100, Richard Weinberger wrote: >> >> +if (new_dir != old_dir) { >> +fst_inode_ui->parent_inum = new_dir->i_ino; >> +snd_inode_ui->parent_inum = old_dir->i_ino; >> +} >> + >> if

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

2016-12-02 Thread Marcus Folkesson
On Thu, Dec 01, 2016 at 11:02:19PM +0100, Richard Weinberger wrote: > > + if (new_dir != old_dir) { > + fst_inode_ui->parent_inum = new_dir->i_ino; > + snd_inode_ui->parent_inum = old_dir->i_ino; > + } > + > if (old_dir != new_dir) { > if (S_ISD

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

2016-12-01 Thread Richard Weinberger
The new feature UBIFS_FLG_PARENTPOINTER allows looking up the parent. Usually the Linux VFS walks down the filesystem and no parent pointers are needed. But when a filesystem is exportable via NFS such a lookup is needed. We can use a padding field in struct ubifs_ino_node to maintain a pointer to