* space_cache=v2 on root fs
@ 2016-01-18 18:27 Markus Trippelsdorf
2016-01-18 19:12 ` Markus Trippelsdorf
0 siblings, 1 reply; 3+ messages in thread
From: Markus Trippelsdorf @ 2016-01-18 18:27 UTC (permalink / raw)
To: Omar Sandoval; +Cc: linux-btrfs
Hi,
while testing the new space_cache=v2 mount option it looks like my root fs
doesn't automatically create the new space cache.
I'm using the following /etc/fstab:
UUID=7ef56edc-673e-452e-9e05-3fabf074168b / btrfs noatime,compress=lzo,space_cache=v2 0 0
UUID=6b7d75bf-3d12-409c-88ed-500ac6b78510 /var btrfs compress=lzo,space_cache=v2 0 0
UUID=24cee7e4-9093-4f86-aa73-d8a59d7f3c6c /var/tmp btrfs compress=lzo,space_cache=v2 0 0
During first mount the space cache was created for /var (/dev/sdb2) and
/var/tmp (/dev/sda3), but apparently not for / (/dev/sdc3):
Jan 18 18:48:18 x4 kernel: BTRFS info (device sdb2): enabling free space tree
Jan 18 18:48:18 x4 kernel: BTRFS info (device sdb2): using free space tree
Jan 18 18:48:18 x4 kernel: BTRFS: creating free space tree
Jan 18 18:48:18 x4 kernel: BTRFS info (device sdb2): setting 1 ro feature flag
Jan 18 18:48:18 x4 kernel: BTRFS: checking UUID tree
Jan 18 18:48:18 x4 kernel: BTRFS info (device sda3): enabling free space tree
Jan 18 18:48:18 x4 kernel: BTRFS info (device sda3): using free space tree
Jan 18 18:48:18 x4 kernel: BTRFS: has skinny extents
Jan 18 18:48:18 x4 kernel: BTRFS: detected SSD devices, enabling SSD mode
Jan 18 18:48:18 x4 kernel: BTRFS: creating free space tree
Jan 18 18:48:18 x4 kernel: BTRFS info (device sda3): setting 1 ro feature flag
Jan 18 18:48:18 x4 kernel: BTRFS: checking UUID tree
Jan 18 18:48:22 x4 kernel: BTRFS info (device sdc3): enabling free space tree
Jan 18 18:48:22 x4 kernel: BTRFS info (device sdc3): using free space tree
During subsequent boots the "enabling free space tree" message is
repeated every time for the root fs.
Jan 18 18:53:48 x4 kernel: BTRFS info (device sdb2): using free space tree
Jan 18 18:53:48 x4 kernel: BTRFS info (device sda3): using free space tree
Jan 18 18:53:52 x4 kernel: BTRFS info (device sdc3): enabling free space tree
Jan 18 18:53:52 x4 kernel: BTRFS info (device sdc3): using free space tree
markus@x4 tmp % mount
/dev/sdc3 on / type btrfs (rw,noatime,compress=lzo,ssd,noacl,space_cache=v2,subvolid=5,subvol=/)
devtmpfs on /dev type devtmpfs (rw,relatime,size=4080208k,nr_inodes=1020052,mode=755)
proc on /proc type proc (rw,relatime)
sys on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
none on /dev/shm type tmpfs (rw,relatime,size=409600k)
/dev/sdb2 on /var type btrfs (rw,relatime,compress=lzo,noacl,space_cache=v2,subvolid=5,subvol=/)
/dev/sda3 on /var/tmp type btrfs (rw,relatime,compress=lzo,ssd,noacl,space_cache=v2,subvolid=5,subvol=/)
--
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: space_cache=v2 on root fs
2016-01-18 18:27 space_cache=v2 on root fs Markus Trippelsdorf
@ 2016-01-18 19:12 ` Markus Trippelsdorf
2016-01-18 21:04 ` Kai Krakow
0 siblings, 1 reply; 3+ messages in thread
From: Markus Trippelsdorf @ 2016-01-18 19:12 UTC (permalink / raw)
To: Omar Sandoval; +Cc: linux-btrfs
On 2016.01.18 at 19:27 +0100, Markus Trippelsdorf wrote:
> Hi,
>
> while testing the new space_cache=v2 mount option it looks like my root fs
> doesn't automatically create the new space cache.
>
> I'm using the following /etc/fstab:
>
> UUID=7ef56edc-673e-452e-9e05-3fabf074168b / btrfs noatime,compress=lzo,space_cache=v2 0 0
> UUID=6b7d75bf-3d12-409c-88ed-500ac6b78510 /var btrfs compress=lzo,space_cache=v2 0 0
> UUID=24cee7e4-9093-4f86-aa73-d8a59d7f3c6c /var/tmp btrfs compress=lzo,space_cache=v2 0 0
>
> During first mount the space cache was created for /var (/dev/sdb2) and
> /var/tmp (/dev/sda3), but apparently not for / (/dev/sdc3):
>
> Jan 18 18:48:18 x4 kernel: BTRFS info (device sdb2): enabling free space tree
> Jan 18 18:48:18 x4 kernel: BTRFS info (device sdb2): using free space tree
> Jan 18 18:48:18 x4 kernel: BTRFS: creating free space tree
> Jan 18 18:48:18 x4 kernel: BTRFS info (device sdb2): setting 1 ro feature flag
> Jan 18 18:48:18 x4 kernel: BTRFS: checking UUID tree
> Jan 18 18:48:18 x4 kernel: BTRFS info (device sda3): enabling free space tree
> Jan 18 18:48:18 x4 kernel: BTRFS info (device sda3): using free space tree
> Jan 18 18:48:18 x4 kernel: BTRFS: has skinny extents
> Jan 18 18:48:18 x4 kernel: BTRFS: detected SSD devices, enabling SSD mode
> Jan 18 18:48:18 x4 kernel: BTRFS: creating free space tree
> Jan 18 18:48:18 x4 kernel: BTRFS info (device sda3): setting 1 ro feature flag
> Jan 18 18:48:18 x4 kernel: BTRFS: checking UUID tree
> Jan 18 18:48:22 x4 kernel: BTRFS info (device sdc3): enabling free space tree
> Jan 18 18:48:22 x4 kernel: BTRFS info (device sdc3): using free space tree
>
> During subsequent boots the "enabling free space tree" message is
> repeated every time for the root fs.
>
> Jan 18 18:53:48 x4 kernel: BTRFS info (device sdb2): using free space tree
> Jan 18 18:53:48 x4 kernel: BTRFS info (device sda3): using free space tree
> Jan 18 18:53:52 x4 kernel: BTRFS info (device sdc3): enabling free space tree
> Jan 18 18:53:52 x4 kernel: BTRFS info (device sdc3): using free space tree
To answer my own question. Adding "rw rootflags=space_cache=v2" to the
GRUB kernel entry fixes the issue...
--
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: space_cache=v2 on root fs
2016-01-18 19:12 ` Markus Trippelsdorf
@ 2016-01-18 21:04 ` Kai Krakow
0 siblings, 0 replies; 3+ messages in thread
From: Kai Krakow @ 2016-01-18 21:04 UTC (permalink / raw)
To: linux-btrfs
Am Mon, 18 Jan 2016 20:12:43 +0100
schrieb Markus Trippelsdorf <markus@trippelsdorf.de>:
> On 2016.01.18 at 19:27 +0100, Markus Trippelsdorf wrote:
> > Hi,
> >
> > while testing the new space_cache=v2 mount option it looks like my
> > root fs doesn't automatically create the new space cache.
> >
> > I'm using the following /etc/fstab:
> >
> > UUID=7ef56edc-673e-452e-9e05-3fabf074168b /
> > btrfs noatime,compress=lzo,space_cache=v2 0 0
> > UUID=6b7d75bf-3d12-409c-88ed-500ac6b78510 /var
> > btrfs compress=lzo,space_cache=v2 0 0
> > UUID=24cee7e4-9093-4f86-aa73-d8a59d7f3c6c /var/tmp
> > btrfs compress=lzo,space_cache=v2 0 0
> >
> > During first mount the space cache was created for /var (/dev/sdb2)
> > and /var/tmp (/dev/sda3), but apparently not for / (/dev/sdc3):
> >
> > Jan 18 18:48:18 x4 kernel: BTRFS info (device sdb2): enabling free
> > space tree Jan 18 18:48:18 x4 kernel: BTRFS info (device sdb2):
> > using free space tree Jan 18 18:48:18 x4 kernel: BTRFS: creating
> > free space tree Jan 18 18:48:18 x4 kernel: BTRFS info (device
> > sdb2): setting 1 ro feature flag Jan 18 18:48:18 x4 kernel: BTRFS:
> > checking UUID tree Jan 18 18:48:18 x4 kernel: BTRFS info (device
> > sda3): enabling free space tree Jan 18 18:48:18 x4 kernel: BTRFS
> > info (device sda3): using free space tree Jan 18 18:48:18 x4
> > kernel: BTRFS: has skinny extents Jan 18 18:48:18 x4 kernel: BTRFS:
> > detected SSD devices, enabling SSD mode Jan 18 18:48:18 x4 kernel:
> > BTRFS: creating free space tree Jan 18 18:48:18 x4 kernel: BTRFS
> > info (device sda3): setting 1 ro feature flag Jan 18 18:48:18 x4
> > kernel: BTRFS: checking UUID tree Jan 18 18:48:22 x4 kernel: BTRFS
> > info (device sdc3): enabling free space tree Jan 18 18:48:22 x4
> > kernel: BTRFS info (device sdc3): using free space tree
> >
> > During subsequent boots the "enabling free space tree" message is
> > repeated every time for the root fs.
> >
> > Jan 18 18:53:48 x4 kernel: BTRFS info (device sdb2): using free
> > space tree Jan 18 18:53:48 x4 kernel: BTRFS info (device sda3):
> > using free space tree Jan 18 18:53:52 x4 kernel: BTRFS info (device
> > sdc3): enabling free space tree Jan 18 18:53:52 x4 kernel: BTRFS
> > info (device sdc3): using free space tree
>
> To answer my own question. Adding "rw rootflags=space_cache=v2" to the
> GRUB kernel entry fixes the issue...
This is because the contents of /etc/fstab are not available during
first mount at boot time - for obvious reasons. Actually, the entry for
rootfs in /etc/fstab is more or less a no-op and only there to satisfy
some legacy tools. Some initramfs generators may also use this to
construct a proper grub cmdline. At least dracut seems to rely on other
mechanics, tho. So it's probably obsolete.
There's only one point when it is used: During remount of the fs during
system initialization. But only some mount options can change during
remount, I imagine space_cache is not part of this.
Due to this remount, it is best to keep both in sync: grub cmdline and
fstab.
I think systemd has some efforts of obsoleting the rootfs line from
fstab, however I'm not sure what's the progress here. I still use it
because last time I tried removing it, it had strange effects.
--
Regards,
Kai
Replies to list-only preferred.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-18 21:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-18 18:27 space_cache=v2 on root fs Markus Trippelsdorf
2016-01-18 19:12 ` Markus Trippelsdorf
2016-01-18 21:04 ` Kai Krakow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).