From: Andreas Rohner <andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Andreas Rohner <andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
Subject: [PATCH v3 0/2] nilfs2: add support for FITRIM ioctl
Date: Fri, 21 Feb 2014 15:56:49 +0100 [thread overview]
Message-ID: <cover.1392994051.git.andreas.rohner@gmx.net> (raw)
Hi,
This patch adds support for the FITRIM ioctl, which allows user space
tools like fstrim to issue TRIM/DISCARD requests to the underlying
device. It takes a fstrim_range structure as a parameter and for every
clean segment in the specified range the function blkdev_issue_discard
is called. The range is truncated to file system block boundaries.
I tested it with a 32 bit and 64 bit kernel. On the 32 bit system
CONFIG_LBDAF was disabled so that sector_t was 32 bit.
Best regards,
Andreas Rohner
---
v2->v3 (based on review by Ryusuke Konishi)
* Fix integer overflow
* Round range to block boundary instead of sector boundary
* Move range check to nilfs_sufile_trim_fs()
v1->v2 (based on review by Ryusuke Konishi)
* Remove upper limit of minlen
* Add check for minlen
* Round range to sector boundary instead of segment boundary
* Fix minor bug
* Use kmap_atomic instead of kmap
* Move input checks to ioctl.c
* Use nilfs_sufile_segment_usages_in_block()
--
Andreas Rohner (2):
nilfs2: add nilfs_sufile_trim_fs to trim clean segs
nilfs2: add FITRIM ioctl support for nilfs2
fs/nilfs2/ioctl.c | 46 +++++++++++++++++
fs/nilfs2/sufile.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++
fs/nilfs2/sufile.h | 1 +
3 files changed, 194 insertions(+)
--
1.9.0
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2014-02-21 14:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 14:56 Andreas Rohner [this message]
[not found] ` <cover.1392994051.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-21 14:56 ` [PATCH v3 1/2] nilfs2: add nilfs_sufile_trim_fs to trim clean segs Andreas Rohner
[not found] ` <149e07e7a88e8dace12335b18e553d533c0f3443.1392994051.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-23 8:15 ` Ryusuke Konishi
2014-02-21 14:56 ` [PATCH v3 2/2] nilfs2: add FITRIM ioctl support for nilfs2 Andreas Rohner
[not found] ` <076207b0166aca9209a24c16c2a2f67329b69132.1392994051.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-23 7:13 ` Ryusuke Konishi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1392994051.git.andreas.rohner@gmx.net \
--to=andreas.rohner-hi6y0cq0ng0@public.gmane.org \
--cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox