public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsdump: fix restore of ext attrs on root directory
@ 2012-01-06 20:51 Bill Kendall
  2012-01-11 11:42 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Kendall @ 2012-01-06 20:51 UTC (permalink / raw)
  To: xfs

xfsrestore fails to restore extended attributes on the root directory
because Node2path(), which returns a pathname relative to the restore
root, returns an empty string instead of ".".

Signed-off-by: Bill Kendall <wkendall@sgi.com>
---
 restore/tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/restore/tree.c b/restore/tree.c
index afe7042..bb5df06 100644
--- a/restore/tree.c
+++ b/restore/tree.c
@@ -3450,7 +3450,7 @@ static bool_t
 Node2path( nh_t nh, char *path, char *errmsg )
 {
 	intgen_t remainingcnt;
-	path[ 0 ] = 0; /* in case root node passed in */
+	strcpy(path, "."); /* in case root node passed in */
 	remainingcnt = Node2path_recurse( nh, path, MAXPATHLEN, 0 );
 	if ( remainingcnt <= 0 ) {
 		node_t *np = Node_map( nh );
-- 
1.7.0.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfsdump: fix restore of ext attrs on root directory
  2012-01-06 20:51 [PATCH] xfsdump: fix restore of ext attrs on root directory Bill Kendall
@ 2012-01-11 11:42 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2012-01-11 11:42 UTC (permalink / raw)
  To: Bill Kendall; +Cc: xfs

On Fri, Jan 06, 2012 at 02:51:56PM -0600, Bill Kendall wrote:
> xfsrestore fails to restore extended attributes on the root directory
> because Node2path(), which returns a pathname relative to the restore
> root, returns an empty string instead of ".".
> 
> Signed-off-by: Bill Kendall <wkendall@sgi.com>
> ---
>  restore/tree.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-11 11:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-06 20:51 [PATCH] xfsdump: fix restore of ext attrs on root directory Bill Kendall
2012-01-11 11:42 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox