From c3e5086897d4ca179520548f13666276991c2965 Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 14 Sep 2007 21:11:04 +0000 Subject: [PATCH] Branch HEAD Description: Data corruption for OSTs that are formatted larger than 2TB on 32-bit servers. Details : When generating the bio request for lustre file writes the sector number would overflow a temporary variable before being used for the IO. The data reads correctly from Lustre (which will overflow in a similar manner) but other file data or filesystem metadata may be corrupted in some cases. b=13547 --- lustre/ChangeLog | 19 +++++++++++++++---- lustre/obdfilter/filter_io_26.c | 7 ++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index db15c8a..1eb2f2e 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -224,12 +224,23 @@ Bugzilla : 13125 Description: osts not allocated evenly to files Details : change the condition to increase offset_idx +Severity : critical +Frequency : Always for filesystems larger than 2TB on 32-bit systems. +Bugzilla : 13547 +Description: Data corruption for OSTs that are formatted larger than 2TB + on 32-bit servers. +Details : When generating the bio request for lustre file writes the + sector number would overflow a temporary variable before being + used for the IO. The data reads correctly from Lustre (which + will overflow in a similar manner) but other file data or + filesystem metadata may be corrupted in some cases. + Severity : normal Bugzilla : 11230 Description: Tune the kernel for good SCSI performance. Details : Set the value of /sys/block/{dev}/queue/max_sectors_kb - to the value of /sys/block/{dev}/queue/max_hw_sectors_kb - in mount_lustre. + to the value of /sys/block/{dev}/queue/max_hw_sectors_kb + in mount_lustre. Severity : cleanup Bugzilla : 13532 @@ -241,8 +252,8 @@ Severity : normal Bugzilla : 13600 Description: "lfs find -obd UUID" prints directories Details : "lfs find -obd UUID" will return all directory names instead - of just file names. It is incorrect because the directories - do not reside on the OSTs. + of just file names. It is incorrect because the directories + do not reside on the OSTs. Severity : minor Bugzilla : 2369 diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c index 03b456c..463ae55 100644 --- a/lustre/obdfilter/filter_io_26.c +++ b/lustre/obdfilter/filter_io_26.c @@ -289,12 +289,13 @@ int filter_do_bio(struct obd_export *exp, struct inode *inode, continue; } - sector = blocks[block_idx + i] << sector_bits; + sector = (sector_t)blocks[block_idx + i] << sector_bits; /* Additional contiguous file blocks? */ while (i + nblocks < blocks_per_page && - (sector + nblocks*(blocksize>>9)) == - (blocks[block_idx + i + nblocks] << sector_bits)) + (sector + (nblocks << sector_bits)) == + ((sector_t)blocks[block_idx + i + nblocks] << + sector_bits)) nblocks++; if (bio != NULL && -- 1.8.3.1