History log of /haiku/src/bin/fstrim.cpp
Revision Date Author Comments
# 06cf64e9 15-Feb-2023 Augustin Cavalier <waddlesplash@gmail.com>

fstrim: Pretty-print the trimmed size in addition to showing raw byte counts.

Also do not bother printing sizes if we are exiting without success
and nothing was reported as trimmed.


# 3e19f197 30-Jun-2021 David Sebek <dasebek@gmail.com>

Extend the functionality of bin/fstrim

Improvements:
* Introduce new command-line parameters for the offset and length
of the trimmed region
* Introduce a new command-line parameter that must be specified
in order to trim a block/character device instead of a file system
* By default, warn users that trim can potentially destroy data
* Display the number of bytes trimmed even if the ioctl returns
an error

Change-Id: I9eec535abe74f7ef09c927292a120016f4156684
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4154
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 3f06c69e 19-Jul-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

bin/fstrim: Fix format strings through B_PRI macros


# 99086aa3 14-Aug-2013 Axel Dörfler <axeld@pinc-software.de>

trim: Target SCSI UNMAP command instead of WRITE SAME.

* The UNMAP command is theoretically much faster, as it can get many block
ranges instead of just a single range.
* Furthermore, the ATA TRIM command resembles it much better.
* Therefore, fs_trim_data now gets an array of ranges, and we use SCSI UNMAP
to trim.
* Updated BFS code to collect array ranges to fully support the new
fs_trim_data possibilities.


# a352b438 04-Aug-2013 Axel Dörfler <axeld@pinc-software.de>

Added fstrim command.

Later, there should be a service that runs this from time to time for all
devices that support it.

Conflicts:
build/jam/HaikuImage


# 3f06c69ed4140fe54301717d09f3bf751eff1d8f 19-Jul-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

bin/fstrim: Fix format strings through B_PRI macros


# 99086aa32333be5792b0f059ccbbe3c90be05ea6 14-Aug-2013 Axel Dörfler <axeld@pinc-software.de>

trim: Target SCSI UNMAP command instead of WRITE SAME.

* The UNMAP command is theoretically much faster, as it can get many block
ranges instead of just a single range.
* Furthermore, the ATA TRIM command resembles it much better.
* Therefore, fs_trim_data now gets an array of ranges, and we use SCSI UNMAP
to trim.
* Updated BFS code to collect array ranges to fully support the new
fs_trim_data possibilities.


# a352b438960f14e070d0850080706f9930dcd30f 04-Aug-2013 Axel Dörfler <axeld@pinc-software.de>

Added fstrim command.

Later, there should be a service that runs this from time to time for all
devices that support it.

Conflicts:
build/jam/HaikuImage