public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsrestore: fix multi stream support
@ 2013-10-01 16:30 Rich Johnston
  2013-10-01 20:47 ` Eric Sandeen
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Rich Johnston @ 2013-10-01 16:30 UTC (permalink / raw)
  To: xfs-oss

If no extents exist, there is no need to call partial_reg() because
there is no data to split up. Also remove the uneeded check in 
partial_reg() to detect if this is a multistream restore.

Signed-off-by: Rich Johnston <rjohnston@sgi.com>

diff --git a/restore/content.c b/restore/content.c
index 54d933c..ecbcf13 100644
--- a/restore/content.c
+++ b/restore/content.c
@@ -7494,6 +7494,7 @@ restore_extent_group( drive_t *drivep,
  	extenthdr_t ehdr;
  	off64_t bytesread;
  	rv_t rv;
+	uint num_extents = 0; /* number of extents */

  	/* copy data extents from media to the file
  	 */
@@ -7518,6 +7519,7 @@ restore_extent_group( drive_t *drivep,
  		if ( ehdr.eh_type == EXTENTHDR_TYPE_LAST ) {
  			break;
  		}
+		num_extents++;

  		/* if its an ALIGNment extent, discard the extent.
  		 */
@@ -7572,7 +7574,7 @@ restore_extent_group( drive_t *drivep,
  	 * and certain extended inode flags. Register the portion
  	 * of the file completed here in the persistent state.
  	 */
-	if (bstatp->bs_size > restoredsz) {
+	if (num_extents && (bstatp->bs_size > restoredsz)) {
  		partial_reg(drivep->d_index,
  			    bstatp->bs_ino,
  			    bstatp->bs_size,
@@ -8959,9 +8961,6 @@ partial_reg( ix_t d_index,

  	endoffset = offset + sz;

-	if ( partialmax == 0 )
-		return;
-
  	pi_lock();

  	/* Search for a matching inode.  Gaps can exist so we must search

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

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

end of thread, other threads:[~2013-10-08 19:57 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01 16:30 [PATCH] xfsrestore: fix multi stream support Rich Johnston
2013-10-01 20:47 ` Eric Sandeen
2013-10-01 21:39   ` Rich Johnston
2013-10-01 22:02     ` Rich Johnston
2013-10-02  3:57       ` Eric Sandeen
2013-10-02  4:17         ` Eric Sandeen
2013-10-02  4:26       ` Eric Sandeen
2013-10-02 18:41 ` Eric Sandeen
2013-10-02 20:03   ` Rich Johnston
2013-10-02 20:13     ` Eric Sandeen
2013-10-03 13:40       ` Rich Johnston
     [not found] ` <20131003212114.493910914@sgi.com>
2013-10-03 22:11   ` [PATCH] xfsdump: handle large, wholly-sparse files Eric Sandeen
2013-10-03 23:11 ` [PATCH V2] " Rich Johnston
2013-10-03 23:16   ` Eric Sandeen
2013-10-07 19:38 ` [PATCH] xfstests XFS: verify extended attributes after multi-stream xfsdump/xfsrestore rjohnston
2013-10-07 20:32   ` Eric Sandeen
2013-10-07 20:54     ` Rich Johnston
2013-10-07 21:00       ` Eric Sandeen
2013-10-08  0:53   ` Dave Chinner
2013-10-08  0:57     ` Eric Sandeen
2013-10-08  0:58       ` Eric Sandeen
2013-10-08 14:21       ` Rich Johnston
2013-10-08 19:27         ` Dave Chinner
2013-10-08 19:57           ` Eric Sandeen
2013-10-08  1:08   ` Dave Chinner
2013-10-08 14:22     ` Rich Johnston
2013-10-08 14:43 ` [PATCH V2] xfstests XFS: verify extended attributes after multi-stream xfsdump/xfsrestore are not lost rjohnston

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