mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kurt Garloff <garloff@suse.de>
To: Jens Axboe <axboe@suse.de>
Cc: Lorenzo Allegrucci <l_allegrucci@despammed.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.6-mm5 oops mounting ext3 or reiserfs with -o barrier
Date: Sun, 23 May 2004 12:37:18 +0200	[thread overview]
Message-ID: <20040523103717.GA5253@tpkurt.garloff.de> (raw)
In-Reply-To: <20040523082728.GH1952@suse.de>

[-- Attachment #1: Type: text/plain, Size: 1361 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-05-23 10:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-22 19:07 Lorenzo Allegrucci
2004-05-22 19:21 ` Andrew Morton
2004-05-22 21:20   ` Jens Axboe
2004-05-22 21:30     ` Jens Axboe
2004-05-23  8:58       ` Lorenzo Allegrucci
2004-05-23  9:11         ` Jens Axboe
2004-05-23 10:03           ` Jens Axboe
2004-05-23 15:32             ` Lorenzo Allegrucci
2004-05-23 15:45               ` Jens Axboe
2004-05-23 16:43                 ` Lorenzo Allegrucci
2004-05-23 16:56                   ` Jens Axboe
2004-05-23 17:17                     ` Lorenzo Allegrucci
2004-05-23 17:31                       ` Jens Axboe
2004-05-23 20:41                         ` Lorenzo Allegrucci
2004-05-23  8:27 ` Jens Axboe
2004-05-23 10:37   ` Kurt Garloff [this message]
2004-05-23 10:56     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040523103717.GA5253@tpkurt.garloff.de \
    --to=garloff@suse.de \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=l_allegrucci@despammed.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®