Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-07 Thread Gao Xiang
Hi Chao, On Thu, May 07, 2020 at 02:38:39PM +0800, Chao Yu wrote: > On 2020/5/7 6:36, Gao Xiang wrote: > > On Wed, May 06, 2020 at 12:16:13PM -0700, Eric Biggers wrote: > >> On Wed, May 06, 2020 at 02:47:19PM +0800, Gao Xiang wrote: > >>> On Wed, May 06, 2020 at 09:58:22AM +0800, Gao Xiang wrote:

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-07 Thread Chao Yu
On 2020/5/7 6:36, Gao Xiang wrote: > On Wed, May 06, 2020 at 12:16:13PM -0700, Eric Biggers wrote: >> On Wed, May 06, 2020 at 02:47:19PM +0800, Gao Xiang wrote: >>> On Wed, May 06, 2020 at 09:58:22AM +0800, Gao Xiang wrote: On Tue, May 05, 2020 at 06:24:28PM -0700, Eric Biggers wrote: >

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-07 Thread Chao Yu
On 2020/5/6 14:55, Chao Yu wrote: > On 2020/5/6 9:24, Eric Biggers wrote: >> On Wed, May 06, 2020 at 08:14:07AM +0800, Gao Xiang wrote: Actually, I think this is wrong because the fsync can be done via a file descriptor that was opened to a now-deleted link to the file. >>> >>> I'm

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-06 Thread Gao Xiang
On Wed, May 06, 2020 at 12:16:13PM -0700, Eric Biggers wrote: > On Wed, May 06, 2020 at 02:47:19PM +0800, Gao Xiang wrote: > > On Wed, May 06, 2020 at 09:58:22AM +0800, Gao Xiang wrote: > > > On Tue, May 05, 2020 at 06:24:28PM -0700, Eric Biggers wrote: > > > > On Wed, May 06, 2020 at 08:14:07AM

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-06 Thread Eric Biggers
On Wed, May 06, 2020 at 02:47:19PM +0800, Gao Xiang wrote: > On Wed, May 06, 2020 at 09:58:22AM +0800, Gao Xiang wrote: > > On Tue, May 05, 2020 at 06:24:28PM -0700, Eric Biggers wrote: > > > On Wed, May 06, 2020 at 08:14:07AM +0800, Gao Xiang wrote: > > > > > > > > > > Actually, I think this is

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-06 Thread Chao Yu
On 2020/5/6 9:24, Eric Biggers wrote: > On Wed, May 06, 2020 at 08:14:07AM +0800, Gao Xiang wrote: >>> >>> Actually, I think this is wrong because the fsync can be done via a file >>> descriptor that was opened to a now-deleted link to the file. >> >> I'm still confused about this... >> >> I don't

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-06 Thread Gao Xiang
On Wed, May 06, 2020 at 09:58:22AM +0800, Gao Xiang wrote: > On Tue, May 05, 2020 at 06:24:28PM -0700, Eric Biggers wrote: > > On Wed, May 06, 2020 at 08:14:07AM +0800, Gao Xiang wrote: > > > > > > > > Actually, I think this is wrong because the fsync can be done via a file > > > > descriptor that

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Gao Xiang
On Tue, May 05, 2020 at 06:24:28PM -0700, Eric Biggers wrote: > On Wed, May 06, 2020 at 08:14:07AM +0800, Gao Xiang wrote: > > > > > > Actually, I think this is wrong because the fsync can be done via a file > > > descriptor that was opened to a now-deleted link to the file. > > > > I'm still

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Eric Biggers
On Wed, May 06, 2020 at 08:14:07AM +0800, Gao Xiang wrote: > > > > Actually, I think this is wrong because the fsync can be done via a file > > descriptor that was opened to a now-deleted link to the file. > > I'm still confused about this... > > I don't know what's wrong with this version from

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Gao Xiang
Hi Eric, On Tue, May 05, 2020 at 11:19:41AM -0700, Eric Biggers wrote: > On Tue, May 05, 2020 at 11:13:23AM -0700, Jaegeuk Kim wrote: ... > > > > -static int get_parent_ino(struct inode *inode, nid_t *pino) > > -{ > > - struct dentry *dentry; > > - > > - inode = igrab(inode); > > - dentry

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Jaegeuk Kim
On 05/05, Eric Biggers wrote: > On Tue, May 05, 2020 at 11:49:32AM -0700, Jaegeuk Kim wrote: > > How about this? > > > > From 2a6b0e53e592854306062a2dc35db2d8f79062f2 Mon Sep 17 00:00:00 2001 > > From: Jaegeuk Kim > > Date: Tue, 5 May 2020 11:33:29 -0700 > > Subject: [PATCH] f2fs: find a living

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Eric Biggers
On Tue, May 05, 2020 at 11:49:32AM -0700, Jaegeuk Kim wrote: > How about this? > > From 2a6b0e53e592854306062a2dc35db2d8f79062f2 Mon Sep 17 00:00:00 2001 > From: Jaegeuk Kim > Date: Tue, 5 May 2020 11:33:29 -0700 > Subject: [PATCH] f2fs: find a living dentry when finding parent ino > > We need

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Jaegeuk Kim
On 05/05, Eric Biggers wrote: > On Tue, May 05, 2020 at 11:13:23AM -0700, Jaegeuk Kim wrote: > > On 05/05, Eric Biggers wrote: > > > On Tue, May 05, 2020 at 08:31:39AM -0700, Jaegeuk Kim wrote: > > > > We had to grab the inode before retrieving i_ino. > > > > > > > > Signed-off-by: Jaegeuk Kim >

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Jaegeuk Kim
On 05/05, Eric Biggers wrote: > On Tue, May 05, 2020 at 09:58:47AM -0700, Eric Biggers wrote: > > On Tue, May 05, 2020 at 08:31:39AM -0700, Jaegeuk Kim wrote: > > > We had to grab the inode before retrieving i_ino. > > > > > > Signed-off-by: Jaegeuk Kim > > > --- > > > fs/f2fs/file.c | 8

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Eric Biggers
On Tue, May 05, 2020 at 11:13:23AM -0700, Jaegeuk Kim wrote: > On 05/05, Eric Biggers wrote: > > On Tue, May 05, 2020 at 08:31:39AM -0700, Jaegeuk Kim wrote: > > > We had to grab the inode before retrieving i_ino. > > > > > > Signed-off-by: Jaegeuk Kim > > > --- > > > fs/f2fs/file.c | 8

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Jaegeuk Kim
On 05/05, Eric Biggers wrote: > On Tue, May 05, 2020 at 08:31:39AM -0700, Jaegeuk Kim wrote: > > We had to grab the inode before retrieving i_ino. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/file.c | 8 +++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Eric Biggers
On Tue, May 05, 2020 at 09:58:47AM -0700, Eric Biggers wrote: > On Tue, May 05, 2020 at 08:31:39AM -0700, Jaegeuk Kim wrote: > > We had to grab the inode before retrieving i_ino. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/file.c | 8 +++- > > 1 file changed, 7 insertions(+), 1

Re: [f2fs-dev] [PATCH] f2fs: get parent inode when recovering pino

2020-05-05 Thread Eric Biggers
On Tue, May 05, 2020 at 08:31:39AM -0700, Jaegeuk Kim wrote: > We had to grab the inode before retrieving i_ino. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/file.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index