Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH 1/2] SCSI tape: fix buffer position in partial write
@ 2008-05-04 19:13 Kai Makisara
  2008-05-04 19:28 ` Kai Makisara
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Makisara @ 2008-05-04 19:13 UTC (permalink / raw)
  To: linux-scsi; +Cc: Mike Christie

Move buffer pointer back when data could not be written. Bug found by Mike Christie.

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
---
The patch is against 2.6.26-rc1.

 drivers/scsi/st.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6.26-rc1-q/drivers/scsi/st.c
===================================================================
--- linux-2.6.26-rc1-q.orig/drivers/scsi/st.c
+++ linux-2.6.26-rc1-q/drivers/scsi/st.c
@@ -17,7 +17,7 @@
    Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
  */
 
-static const char *verstr = "20080224";
+static const char *verstr = "20080504";
 
 #include <linux/module.h>
 
@@ -1663,6 +1663,7 @@ st_write(struct file *filp, const char _
 				if (undone <= do_count) {
 					/* Only data from this write is not written */
 					count += undone;
+					b_point -= undone;
 					do_count -= undone;
 					if (STp->block_size)
 						blks = (transfer - undone) / STp->block_size;

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

end of thread, other threads:[~2008-05-04 19:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-04 19:13 [PATCH 1/2] SCSI tape: fix buffer position in partial write Kai Makisara
2008-05-04 19:28 ` Kai Makisara

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