* File compression control, again.
@ 2011-09-27 17:17 Artem
2011-09-28 1:45 ` Li Zefan
0 siblings, 1 reply; 5+ messages in thread
From: Artem @ 2011-09-27 17:17 UTC (permalink / raw)
To: linux-btrfs
Hi!
So, it makes sense to keep the compression on by default
and with LZO many people are going there.
But, I want to create a database on a compressed btrfs filesystem
which is seek-heavy rather than throughput-heavy
and I really want to turn the compression off just for that database
(smaller I/O reads, more precise cache usage).
Maintenance nightmare that Miguel mentioned
( http://thread.gmane.org/gmane.comp.file-systems.btrfs/1665/focus=1669 )
isn't really a problem as I'm going to automatically set the flags
from the program, just before opening the database.
Looking at "fs/btrfs/ioctl.h" I don't see any way to to this.
Subvolume compression control isn't working either from what I heard
(cf. https://bbs.archlinux.org/viewtopic.php?id=126635
http://thread.gmane.org/gmane.comp.file-systems.btrfs/6237/ ).
Am I right that fine-grained compression control is no longer supported by btrfs?
If so, I would like to vote for it to be added.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: File compression control, again.
2011-09-27 17:17 File compression control, again Artem
@ 2011-09-28 1:45 ` Li Zefan
2011-09-28 13:26 ` Artem
2011-09-28 14:50 ` Artem
0 siblings, 2 replies; 5+ messages in thread
From: Li Zefan @ 2011-09-28 1:45 UTC (permalink / raw)
To: Artem; +Cc: linux-btrfs
01:17, Artem worte:
> Hi!
>
> So, it makes sense to keep the compression on by default
> and with LZO many people are going there.
>
> But, I want to create a database on a compressed btrfs filesystem
> which is seek-heavy rather than throughput-heavy
> and I really want to turn the compression off just for that database
> (smaller I/O reads, more precise cache usage).
>
> Maintenance nightmare that Miguel mentioned
> ( http://thread.gmane.org/gmane.comp.file-systems.btrfs/1665/focus=1669 )
> isn't really a problem as I'm going to automatically set the flags
> from the program, just before opening the database.
>
> Looking at "fs/btrfs/ioctl.h" I don't see any way to to this.
> Subvolume compression control isn't working either from what I heard
> (cf. https://bbs.archlinux.org/viewtopic.php?id=126635
> http://thread.gmane.org/gmane.comp.file-systems.btrfs/6237/ ).
>
> Am I right that fine-grained compression control is no longer supported by btrfs?
> If so, I would like to vote for it to be added.
>
See this "Per file/directory controls for COW and compression":
http://marc.info/?l=linux-btrfs&m=130078867208491&w=2
And the user tool patch (which got no reply):
http://marc.info/?l=linux-btrfs&m=130311215721242&w=2
So you can create a directory, and set the no-compress flag for it, and
then any file created in that dir will inherit the flag.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: File compression control, again.
2011-09-28 1:45 ` Li Zefan
@ 2011-09-28 13:26 ` Artem
2011-09-28 14:50 ` Artem
1 sibling, 0 replies; 5+ messages in thread
From: Artem @ 2011-09-28 13:26 UTC (permalink / raw)
To: linux-btrfs
Li Zefan <lizf <at> cn.fujitsu.com> writes:
> See this "Per file/directory controls for COW and compression":
>
> http://marc.info/?l=linux-btrfs&m=130078867208491&w=2
>
> And the user tool patch (which got no reply):
>
> http://marc.info/?l=linux-btrfs&m=130311215721242&w=2
>
> So you can create a directory, and set the no-compress flag for it, and
> then any file created in that dir will inherit the flag.
Thanks, Li, but how do I set the no-compress flag?
The patched chattr you mention can only set the FS_COMPR_FL.
The 'C' argument is now used for FS_NOCOW_FL.
Could we use another flag for copy-on-write control in chattr?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: File compression control, again.
2011-09-28 1:45 ` Li Zefan
2011-09-28 13:26 ` Artem
@ 2011-09-28 14:50 ` Artem
2011-09-28 21:09 ` David Sterba
1 sibling, 1 reply; 5+ messages in thread
From: Artem @ 2011-09-28 14:50 UTC (permalink / raw)
To: linux-btrfs
Li Zefan <lizf <at> cn.fujitsu.com> writes:
> See this "Per file/directory controls for COW and compression":
>
> http://marc.info/?l=linux-btrfs&m=130078867208491&w=2
Thanks again!
I wrote a program to see if ioctl compression control works
( https://gist.github.com/1248085 )
and it does! : )
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: File compression control, again.
2011-09-28 14:50 ` Artem
@ 2011-09-28 21:09 ` David Sterba
0 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2011-09-28 21:09 UTC (permalink / raw)
To: Artem; +Cc: linux-btrfs
On Wed, Sep 28, 2011 at 02:50:13PM +0000, Artem wrote:
> Li Zefan <lizf <at> cn.fujitsu.com> writes:
> > See this "Per file/directory controls for COW and compression":
> >
> > http://marc.info/?l=linux-btrfs&m=130078867208491&w=2
>
> Thanks again!
> I wrote a program to see if ioctl compression control works
> ( https://gist.github.com/1248085 )
you have to call IOC_GETFLAGS first, then
flags |= FS_NOCOMP_FL;
27 int flags = compression ? FS_COMPR_FL : FS_NOCOMP_FL;
28 int ret = ioctl (fd, FS_IOC_SETFLAGS, &flags);
else all other flags will be dropped.
david
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-28 21:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-27 17:17 File compression control, again Artem
2011-09-28 1:45 ` Li Zefan
2011-09-28 13:26 ` Artem
2011-09-28 14:50 ` Artem
2011-09-28 21:09 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.