[Ocfs2-tools-devel] [PATCH 0/2 v4] support discarding unused blocks before mkfs

Joseph Qi jiangqi903 at gmail.com
Tue Mar 6 18:34:02 PST 2018


Applied, thanks.

On 18/3/5 16:25, Larry Chen wrote:
> When using an SSD as an underlying block device, 
> if unused blocks could be discarded in advance,
> performance will be improved.
> 
> This patch uses ioctl interface to release unused
> blocks on SSD layer.
> 
> change log:
> 1.  Correct the use of type errcode_t and int.
> 2.  Remove unnecessary braces.
> 3.  Fix the misusage of com_err() which accepts an error code 
>     of type errcode_t, not linux standard errno.
> 4.  Catch all values of errno except 'EOPNOTSUPP', and notice upper users.
> 5.  Rename functions for more fitness.
> 6.  Adjust the return value of discard_blocks function.
> 7.  If some error happens within discard_blocks, print a notice in 
>     the parent function discard_device_blocks, rather than in-place.
> 8.  Replace the option "-d" with "--discard" and "--nodiscard".
> 9.  "--discard" works as default.
> 10. Add corresponding description on man pages.
> 11. Rename arguments of function discard_blocks from 'block' to 'from'.
> 12. Remove unnecessary type cast within discard_blocks.
> 
> Larry Chen (2):
>   Modifify man page for discarding unused blocks
>   discard unused blocks before mkfs
> 
>  mkfs.ocfs2/mkfs.c          | 55 +++++++++++++++++++++++++++++++++++++++++++++-
>  mkfs.ocfs2/mkfs.h          | 10 +++++++++
>  mkfs.ocfs2/mkfs.ocfs2.8.in | 15 ++++++++++++-
>  3 files changed, 78 insertions(+), 2 deletions(-)
> 



More information about the Ocfs2-tools-devel mailing list