* [PATCH] xfsprogs: initialize filetype for lost+found creation @ 2013-09-17 17:07 Eric Sandeen 2013-09-18 20:55 ` Mark Tinguely 2013-10-18 17:45 ` Rich Johnston 0 siblings, 2 replies; 5+ messages in thread From: Eric Sandeen @ 2013-09-17 17:07 UTC (permalink / raw) To: xfs-oss If we create lost+found make sure it's got the proper filetype. Signed-off-by: Eric Sandeen <sandeen@redhat.com> --- (sorry, untested, not sure how to force creation when I can't use xfs_db to craft a filesystem that needs lost+found) diff --git a/repair/phase6.c b/repair/phase6.c index a4ad7a3..946cb6d 100644 --- a/repair/phase6.c +++ b/repair/phase6.c @@ -904,6 +904,8 @@ mk_orphanage(xfs_mount_t *mp) xname.name = (unsigned char *)ORPHANAGE; xname.len = strlen(ORPHANAGE); + xname.type = XFS_DIR3_FT_DIR; + if (libxfs_dir_lookup(NULL, pip, &xname, &ino, NULL) == 0) return ino; _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xfsprogs: initialize filetype for lost+found creation 2013-09-17 17:07 [PATCH] xfsprogs: initialize filetype for lost+found creation Eric Sandeen @ 2013-09-18 20:55 ` Mark Tinguely 2013-09-18 21:04 ` Eric Sandeen 2013-10-18 17:45 ` Rich Johnston 1 sibling, 1 reply; 5+ messages in thread From: Mark Tinguely @ 2013-09-18 20:55 UTC (permalink / raw) To: Eric Sandeen; +Cc: xfs-oss On 09/17/13 12:07, Eric Sandeen wrote: > If we create lost+found make sure it's got the proper filetype. > > Signed-off-by: Eric Sandeen<sandeen@redhat.com> > --- > > (sorry, untested, not sure how to force creation when I can't use > xfs_db to craft a filesystem that needs lost+found) The {lib}xfs_dir_lookup() doesn't use the field - just like extended attributes use xfs_names but it won't use the field entry, but it does not hurt to have it initialized to something. Reviewed-by: Mark Tinguely <tinguely@sgi.com> _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfsprogs: initialize filetype for lost+found creation 2013-09-18 20:55 ` Mark Tinguely @ 2013-09-18 21:04 ` Eric Sandeen 2013-09-18 21:17 ` Dave Chinner 0 siblings, 1 reply; 5+ messages in thread From: Eric Sandeen @ 2013-09-18 21:04 UTC (permalink / raw) To: Mark Tinguely; +Cc: xfs-oss On 9/18/13 3:55 PM, Mark Tinguely wrote: > On 09/17/13 12:07, Eric Sandeen wrote: >> If we create lost+found make sure it's got the proper filetype. >> >> Signed-off-by: Eric Sandeen<sandeen@redhat.com> >> --- >> >> (sorry, untested, not sure how to force creation when I can't use >> xfs_db to craft a filesystem that needs lost+found) > > The {lib}xfs_dir_lookup() doesn't use the field - just like extended attributes use xfs_names but it won't use the field entry, but it does not hurt to have it initialized to something. Thanks for the review - just FWIW, I was thinking that it needs to be initialized so that when created, it is created with the proper type, rather than random stack noise. It seems, though, that we're still missing bits in libxfs to actually write the types to disk; I'll look into that. Thanks, -Eric > Reviewed-by: Mark Tinguely <tinguely@sgi.com> > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfsprogs: initialize filetype for lost+found creation 2013-09-18 21:04 ` Eric Sandeen @ 2013-09-18 21:17 ` Dave Chinner 0 siblings, 0 replies; 5+ messages in thread From: Dave Chinner @ 2013-09-18 21:17 UTC (permalink / raw) To: Eric Sandeen; +Cc: Mark Tinguely, xfs-oss On Wed, Sep 18, 2013 at 04:04:42PM -0500, Eric Sandeen wrote: > On 9/18/13 3:55 PM, Mark Tinguely wrote: > > On 09/17/13 12:07, Eric Sandeen wrote: > >> If we create lost+found make sure it's got the proper filetype. > >> > >> Signed-off-by: Eric Sandeen<sandeen@redhat.com> > >> --- > >> > >> (sorry, untested, not sure how to force creation when I can't use > >> xfs_db to craft a filesystem that needs lost+found) > > > > The {lib}xfs_dir_lookup() doesn't use the field - just like extended attributes use xfs_names but it won't use the field entry, but it does not hurt to have it initialized to something. > > Thanks for the review - just FWIW, I was thinking that it needs > to be initialized so that when created, it is created with the proper > type, rather than random stack noise. > > It seems, though, that we're still missing bits in libxfs to actually > write the types to disk; I'll look into that. Patch below. Cheers, Dave. -- Dave Chinner david@fromorbit.com libxfs: fix missing filetype updates to xfs_dir2.c From: Dave Chinner <dchinner@redhat.com> They were missed in the original patch that was committed. Signed-off-by: Dave Chinner <dchinner@redhat.com> --- libxfs/xfs_dir2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libxfs/xfs_dir2.c b/libxfs/xfs_dir2.c index 010c701..96a3c1d 100644 --- a/libxfs/xfs_dir2.c +++ b/libxfs/xfs_dir2.c @@ -194,6 +194,7 @@ xfs_dir_createname( memset(&args, 0, sizeof(xfs_da_args_t)); args.name = name->name; args.namelen = name->len; + args.filetype = name->type; args.hashval = dp->i_mount->m_dirnameops->hashname(name); args.inumber = inum; args.dp = dp; @@ -268,6 +269,7 @@ xfs_dir_lookup( memset(&args, 0, sizeof(xfs_da_args_t)); args.name = name->name; args.namelen = name->len; + args.filetype = name->type; args.hashval = dp->i_mount->m_dirnameops->hashname(name); args.dp = dp; args.whichfork = XFS_DATA_FORK; @@ -323,6 +325,7 @@ xfs_dir_removename( memset(&args, 0, sizeof(xfs_da_args_t)); args.name = name->name; args.namelen = name->len; + args.filetype = name->type; args.hashval = dp->i_mount->m_dirnameops->hashname(name); args.inumber = ino; args.dp = dp; _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xfsprogs: initialize filetype for lost+found creation 2013-09-17 17:07 [PATCH] xfsprogs: initialize filetype for lost+found creation Eric Sandeen 2013-09-18 20:55 ` Mark Tinguely @ 2013-10-18 17:45 ` Rich Johnston 1 sibling, 0 replies; 5+ messages in thread From: Rich Johnston @ 2013-10-18 17:45 UTC (permalink / raw) To: Eric Sandeen, xfs-oss This has been committed. Thanks --Rich commit 68774b900e0c8368342cb12f649572a86ef2f6e4 Author: Eric Sandeen <sandeen@sandeen.net> Date: Tue Sep 17 17:07:45 2013 +0000 xfsprogs: initialize filetype for lost+found creation _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-18 17:45 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-09-17 17:07 [PATCH] xfsprogs: initialize filetype for lost+found creation Eric Sandeen 2013-09-18 20:55 ` Mark Tinguely 2013-09-18 21:04 ` Eric Sandeen 2013-09-18 21:17 ` Dave Chinner 2013-10-18 17:45 ` Rich Johnston
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox