[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D3ADD1DC-674F-4EFB-A82C-9C331F2830BA@whamcloud.com>
Date: Wed, 16 Mar 2011 03:17:32 -0600
From: Andreas Dilger <adilger@...mcloud.com>
To: Lukas Czerner <lczerner@...hat.com>
Cc: "Ted Ts'o" <tytso@....edu>,
ext4 development <linux-ext4@...r.kernel.org>,
Bruce Cassidy <bruce@...mcloud.com>
Subject: Re: [PATCH]: e2fsprogs m_* self tests no longer pass
On 2011-03-16, at 2:14 AM, Lukas Czerner wrote:
> On Tue, 15 Mar 2011, Andreas Dilger wrote:
>> Only display the "Discarding device blocks:" status bar if discard is actually implemented in the IO manager and in the kernel. Otherwise, there is no correct test result that will work in all environments. I'd prefer not to print an error message for the majority of devices that do not support discard, since this is confusing.
>>
>> Signed-off-by: Andreas Dilger <adilger@...ger.ca>
>
> Hi Andreas,
>
> thanks for the patch, it looks good, I have almost the same one in my tree
> :). I was wondering if we have any way to tell if the device support discard
> or not from the user-space, I did not found any reliable way (other than
> actually call BLKDISCARD and see).
I was originally going to add a CHANNEL_FLAGS_DISCARD flag to the iomanager, but just setting this if BLKDISCARD is defined does not determine if the kernel or disk device has support for TRIM/UNMAP. Since the only way to check this AFAICS is to call BLKDISCARD I changed the code as seen in the patch.
It wouldn't be terrible to set or clear the CHANNEL_FLAGS_DISCARD flag for a device depending on whether io_channel_discard() succeeds, but I suspect there will be few cases where discard is called multiple times on the same device.
Cheers, Andreas
--
Andreas Dilger
Principal Engineer
Whamcloud, Inc.
--
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