mainGNU tar - Support: sr #105671, Leave tape in same state after...

 
 

sr #105671: Leave tape in same state after --verify write as after regular write

Submitter:  Andrew Klaassen <clawsoon>
Submitted:  Wed 15 Nov 2006 07:03:23 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  1 - Wish Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Wed 15 Nov 2006 07:03:23 PM UTC, original submission:  

The command 'tar cf' on a no-rewind tape device leaves the tape at a position appropriate to immediately execute another 'tar cf'.

The command 'tar cWf' on a no-rewind tape device, in contrast, requires that the command 'mt fsf 1' be executed before another 'tar cWf' comand is executed, else the file mark gets overwritten.

The following patch makes the behaviour of the two commands (with and without --verify) the same, at least on my Fedora Core 6 system:

--- src/compare.c.orig  2006-11-15 13:24:30.000000000 -0500
+++ src/compare.c       2006-11-15 13:56:40.000000000 -0500
@@ -589,6 +589,16 @@
       xheader_destroy (&extended_header);
     }

+#ifdef MTIOCTOP
+  {
+    struct mtop operation;
+    int status;
+    operation.mt_op = MTFSF;
+    operation.mt_count = 1;
+    status = rmtioctl (archive, MTIOCTOP, (char *) &operation);
+  }
+#endif
+
   access_mode = ACCESS_WRITE;
   now_verifying = 0;
 }

Andrew Klaassen <clawsoon>

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 16MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

History

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2006-11-15 clawsoon Carbon-Copy- Added clawsoon

Back to the top

Powered by Savane 3.16.
Corresponding source code