[linux-lvm] LVM & fstrim behaviour (Fedora 19)
lczerner at redhat.com
Wed Sep 25 08:39:04 UTC 2013
On Tue, 24 Sep 2013, Jorge Fábregas wrote:
> Date: Tue, 24 Sep 2013 14:03:12 -0400
> From: Jorge Fábregas <jorge.fabregas at gmail.com>
> To: linux-lvm at redhat.com
> Cc: Lukáš Czerner <lczerner at redhat.com>
> Subject: Re: [linux-lvm] LVM & fstrim behaviour (Fedora 19)
> ok Lukáš I think I found where the problem is. I just realized that I
> created that filesystem without journaling (in order to increase perform
> for the VM disks). I created it with:
> mkfs.ext4 -O ^has_journal /dev/vgthin1/lvol2
> I went back and created the filesystem again (on a thin lvol) with
> default options and indeed fstrim works as expected. I created ANOTHER
> thinvol (without journaling) and fstrim doesn't work.
> Is this a bug or does fstrim requires ext4 with journal by design?
Oh that's useful information :) Yes, it is a bug and here is
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index a41e3ba..4d113ef 100644
@@ -4794,8 +4794,8 @@ do_more:
" group:%d block:%d count:%lu failed"
" with %d", block_group, bit, count,
+ } else
mb_clear_bits(bitmap_bh->b_data, bit, count_clusters);
> My apologies for not stating this since the beginning!
No problem, important is that we've got to the bottom of this.
Thanks for reporting it!
More information about the linux-lvm