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

Add a New Comment Rich Markup
   

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>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

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.13-cf05.
Corresponding source code