Re: [PATCH]: e2fsprogs m_* self tests no longer pass

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux