[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110504160231.GD31241@redhat.com>
Date: Wed, 4 May 2011 12:02:32 -0400
From: Mike Snitzer <snitzer@...hat.com>
To: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Lukas Czerner <lczerner@...hat.com>, sandeen@...hat.com,
Christoph Hellwig <hch@...radead.org>,
device-mapper development <dm-devel@...hat.com>,
DarkNovaNick@...il.com, linux-lvm@...hat.com,
linux-ext4@...r.kernel.org, Alasdair G Kergon <agk@...hat.com>
Subject: Re: do not disable ext4 discards on first discard failure? [was: Re:
dm snapshot: ignore discards issued to the snapshot-origin target]
On Wed, May 04 2011 at 11:10am -0400,
Martin K. Petersen <martin.petersen@...cle.com> wrote:
> >>>>> "Lukas" == Lukas Czerner <lczerner@...hat.com> writes:
>
> Lukas> Nevertheless there is something weird going on, because even when
> Lukas> I create striped volume I get this:
>
> Could you please try the following patch? It has a bunch of small tweaks
> to the discard stack in it. I'll split it up before posting for real but
> I'd like to know if it fixes your issue...
>
>
> block/libata/scsi: Various logical block provisioning fixes
>
> - Add sysfs documentation for the discard topology parameters
>
> - Fix discard stacking problem
>
> - Switch our libata SAT over to using the WRITE SAME limits
>
> - UNMAP alignment needs to be converted to bytes
>
> - Only report alignment and zeroes_data if the device supports discard
>
> Reported-by: Lukas Czerner <lczerner@...hat.com>
> Signed-off-by: Martin K. Petersen <martin.petersen@...cle.com>
>
> diff --git a/block/blk-settings.c b/block/blk-settings.c
> index 1fa7692..42d3bf5 100644
> --- a/block/blk-settings.c
> +++ b/block/blk-settings.c
> @@ -120,7 +120,7 @@ void blk_set_default_limits(struct queue_limits *lim)
> lim->discard_granularity = 0;
> lim->discard_alignment = 0;
> lim->discard_misaligned = 0;
> - lim->discard_zeroes_data = -1;
> + lim->discard_zeroes_data = 1;
> lim->logical_block_size = lim->physical_block_size = lim->io_min = 512;
> lim->bounce_pfn = (unsigned long)(BLK_BOUNCE_ANY >> PAGE_SHIFT);
> lim->alignment_offset = 0;
lim->discard_zeroes_data = -1; was suspect to me too.
But why default to 1 here?
> @@ -166,6 +166,7 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
>
> blk_set_default_limits(&q->limits);
> blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
> + q->limits.discard_zeroes_data = 0;
>
> /*
> * by default assume old behaviour and bounce for any highmem page
Only to then reset to 0 here? Shouldn't we default to 0 and only set to
1 where applicable (e.g. sd_config_discard)?
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists