From: Ruediger Meier <sweet_f_a@gmx.de>
To: Karel Zak <kzak@redhat.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
Markus Trippelsdorf <markus@trippelsdorf.de>,
util-linux@vger.kernel.org
Subject: Re: [PATCH] fstrim: add systemd units
Date: Thu, 10 Apr 2014 15:16:26 +0200 [thread overview]
Message-ID: <201404101516.26942.sweet_f_a@gmx.de> (raw)
In-Reply-To: <20140410124914.GB26252@x2.net.home>
On Thursday 10 April 2014, Karel Zak wrote:
> On Thu, Apr 10, 2014 at 11:17:04AM +0200, Ruediger Meier wrote:
> > Thanks, maybe we could add another minor change to "fstrim -a"
> > itself. If possible it would be IMO useful to skip bind mounts to
> > avoid trimming the same filesystem several times in a row like
> > this:
> >
> > $ grep "tmp" /etc/fstab
> > /dev/vg0/tmpdirs /mnt/tmpdirs ext4 acl,user_xattr 1
> > 2 /mnt/tmpdirs/tmp /tmp none bind
> > 0 0 /mnt/tmpdirs/var/tmp /var/tmp none bind
> > 0 0
> >
> > $ ./fstrim -av
> > /tmp: 392 KiB (401408 bytes) trimmed
> > /var/tmp: 0 B (0 bytes) trimmed
> > /mnt/tmpdirs: 0 B (0 bytes) trimmed
> >
> > Skipping bind mounts should still trim all mounted filesytems.
>
> Good idea point, but what about systems where the original
> mountpoint is umounted?
>
> /dev/sda1 /foo ext4 default
> /foo /bar none bind
>
> # mount /foo
> # mount /bar
> # umount /foo
Nice, I thought that wouldn't be even possible to do.
> the another story is that we use /proc/self/mountinfo where is
> nothing about "bind". It would be probably better to de-duplicate the
> list of the filesystems according to filesystem UUID or so.
>
> I'll think about it.
Maybe you could borrow the filter from lsblk. With my fstab above it
seems to skip the bind mounts:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 512M 0 part /boot
└─sda2 8:2 0 232.4G 0 part
├─vg0-root 253:0 0 24G 0 lvm /
├─vg0-swap 253:1 0 4G 0 lvm [SWAP]
└─vg0-tmpdirs 253:2 0 204.4G 0 lvm /mnt/tmpdirs
> Note all this is probably no problema for ext4 where according to
> Lukas is optimization to not call device trim command when there is
> nothing to trim.
Yes, but maybe nice if we could avoid this anyway. Who know what happens
exactly when there is already a heavy load queue and we want to place
in several trims.
cu,
Rudi
next prev parent reply other threads:[~2014-04-10 13:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 21:41 [PATCH] fstrim: add systemd units Thomas Bächler
2014-04-07 10:43 ` Karel Zak
2014-04-08 10:25 ` Ruediger Meier
2014-04-08 10:57 ` Thomas Bächler
2014-04-08 12:07 ` Ruediger Meier
2014-04-08 15:42 ` Dave Reisner
2014-04-08 17:12 ` Ruediger Meier
2014-04-09 7:52 ` Karel Zak
2014-04-09 10:07 ` Ruediger Meier
2014-04-09 11:02 ` Karel Zak
2014-04-09 12:12 ` Ruediger Meier
2014-04-09 12:49 ` Thomas Bächler
2014-04-09 15:16 ` Ruediger Meier
2014-04-09 15:24 ` Thomas Bächler
2014-04-09 15:44 ` Ruediger Meier
2014-04-09 14:02 ` Markus Trippelsdorf
2014-04-09 15:48 ` Ruediger Meier
2014-04-09 15:55 ` Markus Trippelsdorf
2014-04-09 18:39 ` Theodore Ts'o
2014-04-10 8:05 ` Karel Zak
2014-04-10 9:17 ` Ruediger Meier
2014-04-10 12:49 ` Karel Zak
2014-04-10 13:16 ` Ruediger Meier [this message]
2014-04-10 13:22 ` Ruediger Meier
2014-04-08 17:26 ` Karel Zak
2014-04-08 17:30 ` Thomas Bächler
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=201404101516.26942.sweet_f_a@gmx.de \
--to=sweet_f_a@gmx.de \
--cc=kzak@redhat.com \
--cc=markus@trippelsdorf.de \
--cc=tytso@mit.edu \
--cc=util-linux@vger.kernel.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