lkml.org 
[lkml]   [2004]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.6-mm5 oops mounting ext3 or reiserfs with -o barrier
Hi Jens,

On Sun, May 23, 2004 at 10:27:28AM +0200, Jens Axboe wrote:
> @@ -1729,8 +1723,29 @@ static void idedisk_setup (ide_drive_t *
>
> write_cache(drive, 1);
>
> - blk_queue_ordered(drive->queue, 1);
> - blk_queue_issue_flush_fn(drive->queue, idedisk_issue_flush);
> + /*
> + * decide if we can sanely support flushes and barriers on
> + * this drive
> + */
> + if (drive->addressing == 1) {
> + /*
> + * if capacity is over 2^28 sectors, drive must support
> + * FLUSH_CACHE_EXT
> + */
> + if (ide_id_has_flush_cache_ext(id))
> + barrier = 1;
> + else if (capacity <= (1ULL << 28))
> + barrier = 1;
> + else
> + printk("%s: drive is buggy, no support for FLUSH_CACHE_EXT with lba48\n", drive->name);

So, for drives with LBA48, you enable barriers either if report to
support it or if their capacity is _smaller_ than 2^28. If neither
is the case, it's left disabled and the kernel complains.
Is it safe to enable for
(addressing == 1 && !ide_id_has_flush_cache_ext() && capacity <= 1<<28)
?
Shouldn't we check ide_has_flush_cache() then, as for the non-
LBA48 drives?

> + } else if (ide_id_has_flush_cache(id))
> + barrier = 1;

Regards,
--
Kurt Garloff <garloff@suse.de> Cologne, DE
SUSE LINUX AG / Novell, Nuernberg, DE Director SUSE Labs
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.105 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site