Message ID | alpine.LFD.2.00.1208161619440.2459@vpn-8-20.rdu.redhat.com |
---|---|
State | Not Applicable, archived |
Headers | show |
On Thu, Aug 16, 2012 at 04:28:07PM +0200, Lukáš Czerner wrote: > > After a little bit of tracing with the systemtap and blktrace ext4 > does not seem to be doing anything wrong and yet we get part of the > block bitmap trimmed. This lead me to the scsi_debug driver itself > and indeed it seems that we have off-by-one bug there in the > unamp_region() which is causing the problem. Thanks for finding this --- I was getting scared that ext4 users were losing data in production. It's good to know it was just a bug in the scsi_debug driver. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 182d5a5..f4cc413 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -2054,7 +2054,7 @@ static void unmap_region(sector_t lba, unsigned int len) block = lba + alignment; rem = do_div(block, granularity); - if (rem == 0 && lba + granularity <= end && block < map_size) { + if (rem == 0 && lba + granularity < end && block < map_size) { clear_bit(block, map_storep); if (scsi_debug_lbprz) memset(fake_storep +