Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-04-12 Thread Lennart Poettering
On Sat, 11.04.15 17:07, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote:

   That's the problem: current functionality works no matter where you
   store the files, but it's hard to provide the same level of
   flexibility with the tmpfiles-based solution.
  
  Well, but we never store files outside of /var/log/journal,
  /var/log/journal/%m and /var/log/journal/remote/, do we? 
 We can, if instructed to do so. journal-remote can store files wherever.
 
 Original motivation for this patch was to make the NOCOW on journal files
 configurable without too much fuss and without making it an explicit option.
 Journal files on btrfs without NOCOW are rather slow, so it seems that most
 people will want NOCOW on. But with the proposed patch, people would want
 to add the tmpfile snippet to set NOCOW for every location they write too,
 which is very visible and requires explicit configuration. Doing this in
 journal-file directly was simple, synchronous, and worked everywhere, and
 we are replacing this with a more complicated and more brittle scheme.
 
 Dunno, if you think things are better this way, I'm fine with that,
 since both schemes should get the job done. But in the end, adding a
 switch in journald.conf seems more in the systemd spirit of doing the right
 thing automatically and also less work for both sides...

What about this solution: let's go the tmpfiles way, but also add some
code to the journal file writer to log at INFO level an actionable
recommendation to turn on the c flag on the directory if we notice
that the newly created file doesn't have it, and it is located on
btrfs?

That way, folks who use the tools on non-default directories will at
least be guided to an explanation of the general problem.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-04-12 Thread Goffredo Baroncelli
On 2015-04-12 15:12, Lennart Poettering wrote:
 On Sat, 11.04.15 17:07, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote:
 
 That's the problem: current functionality works no matter where you
 store the files, but it's hard to provide the same level of
 flexibility with the tmpfiles-based solution.

 Well, but we never store files outside of /var/log/journal,
 /var/log/journal/%m and /var/log/journal/remote/, do we? 
 We can, if instructed to do so. journal-remote can store files wherever.

 Original motivation for this patch was to make the NOCOW on journal files
 configurable without too much fuss and without making it an explicit option.
 Journal files on btrfs without NOCOW are rather slow, so it seems that most
 people will want NOCOW on. But with the proposed patch, people would want
 to add the tmpfile snippet to set NOCOW for every location they write too,
 which is very visible and requires explicit configuration. Doing this in
 journal-file directly was simple, synchronous, and worked everywhere, and
 we are replacing this with a more complicated and more brittle scheme.

 Dunno, if you think things are better this way, I'm fine with that,
 since both schemes should get the job done. But in the end, adding a
 switch in journald.conf seems more in the systemd spirit of doing the right
 thing automatically and also less work for both sides...
 
 What about this solution: let's go the tmpfiles way, but also add some
 code to the journal file writer to log at INFO level an actionable
 recommendation to turn on the c flag on the directory if we notice
 that the newly created file doesn't have it, and it is located on
 btrfs?

After the work that I done to the tmpfiles, I have to agree with Zbyszek. 
Adding an option to the journal.conf file is the more reasonable thing to do.

If we add code that performs only a check in the code of journal, I think that 
we have the worst solution:
- journal code is still aware of the NOCOW attribute (== more code complexity)
- the user had to update/manage a tmpfile.d  manually

Let me to suggest the opposite solution:
- add a switch in the journald.conf file
- add a check that raise a warning if the NOCOW flag is not-used/used

GB



 
 That way, folks who use the tools on non-default directories will at
 least be guided to an explanation of the general problem.
 
 Lennart
 


-- 
gpg @keyserver.linux.it: Goffredo Baroncelli kreijackATinwind.it
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli kreijackATinwind.it
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-04-12 Thread Goffredo Baroncelli
On 2015-04-12 18:06, Lennart Poettering wrote:
 On Sun, 12.04.15 17:29, Goffredo Baroncelli (kreij...@inwind.it) wrote:
 
 On 2015-04-12 15:12, Lennart Poettering wrote:
 On Sat, 11.04.15 17:07, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) 
 wrote:

 That's the problem: current functionality works no matter where you
 store the files, but it's hard to provide the same level of
 flexibility with the tmpfiles-based solution.

 Well, but we never store files outside of /var/log/journal,
 /var/log/journal/%m and /var/log/journal/remote/, do we? 
 We can, if instructed to do so. journal-remote can store files wherever.

 Original motivation for this patch was to make the NOCOW on journal files
 configurable without too much fuss and without making it an explicit 
 option.
 Journal files on btrfs without NOCOW are rather slow, so it seems that most
 people will want NOCOW on. But with the proposed patch, people would want
 to add the tmpfile snippet to set NOCOW for every location they write too,
 which is very visible and requires explicit configuration. Doing this in
 journal-file directly was simple, synchronous, and worked everywhere, and
 we are replacing this with a more complicated and more brittle scheme.

 Dunno, if you think things are better this way, I'm fine with that,
 since both schemes should get the job done. But in the end, adding a
 switch in journald.conf seems more in the systemd spirit of doing the right
 thing automatically and also less work for both sides...

 What about this solution: let's go the tmpfiles way, but also add some
 code to the journal file writer to log at INFO level an actionable
 recommendation to turn on the c flag on the directory if we notice
 that the newly created file doesn't have it, and it is located on
 btrfs?

 After the work that I done to the tmpfiles, I have to agree with
 Zbyszek. Adding an option to the journal.conf file is the more
 reasonable thing to do.
 
 You mean journald.conf I figure? That's not even read by the remoting
 tools, so how is that a solution?

In my first attempt, I added a switch to the command line.

 
 If we add code that performs only a check in the code of journal, I think 
 that we have the worst solution:
 - journal code is still aware of the NOCOW attribute (== more code 
 complexity)
 - the user had to update/manage a tmpfile.d  manually
 
 Well, again: the nocow thing is a work-around around a design issue
 with btrfs, and btrfs is working on correcting that, by adding
 auto-defrag to deal better with write patterns such as this.
 
 We should not add new explicit config options for things we already
 know *now* that they are a stopgap, and will go away eventually.
 
 With the solution I propose (which is tmpfiles snippet + warning if
 non-enabled) we get:
 
 - default behaviour is fast
 
 - default behaviour is easy to override
 
 - specialist users who use the remoting feature and use the thing on a
   non-default directory, are notified about the issue at hand.
 
 - we can easily get rid of it eventually, simply by dropping one
   config line and the generation of a warning. There's no option to
   deprecate then, and keep compat for.

Even if I agree with you about the points above, I am not fully
convinced about changing the NOCOW attribute via tmpfile snippet:
it seems to me an overkill solution..

But I prefer the snippet solution to the old behavior (set the NOCOW attribute
coded in systemd-journald).

 
 Let me to suggest the opposite solution:
 - add a switch in the journald.conf file
 - add a check that raise a warning if the NOCOW flag is not-used/used

 
 This does not fix the remoting issue, since journald.conf isn't read
 by those tools. Also, it adds a setting we'll eventuall have to get
 rid of again. 
 
 Sorry, but I am really against a solution like that. I don't want to
 litter the config file with options that are hacks and will go away
 one day...
 
 Lennart
 


-- 
gpg @keyserver.linux.it: Goffredo Baroncelli kreijackATinwind.it
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-04-12 Thread Lennart Poettering
On Sun, 12.04.15 17:29, Goffredo Baroncelli (kreij...@inwind.it) wrote:

 On 2015-04-12 15:12, Lennart Poettering wrote:
  On Sat, 11.04.15 17:07, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) 
  wrote:
  
  That's the problem: current functionality works no matter where you
  store the files, but it's hard to provide the same level of
  flexibility with the tmpfiles-based solution.
 
  Well, but we never store files outside of /var/log/journal,
  /var/log/journal/%m and /var/log/journal/remote/, do we? 
  We can, if instructed to do so. journal-remote can store files wherever.
 
  Original motivation for this patch was to make the NOCOW on journal files
  configurable without too much fuss and without making it an explicit 
  option.
  Journal files on btrfs without NOCOW are rather slow, so it seems that most
  people will want NOCOW on. But with the proposed patch, people would want
  to add the tmpfile snippet to set NOCOW for every location they write too,
  which is very visible and requires explicit configuration. Doing this in
  journal-file directly was simple, synchronous, and worked everywhere, and
  we are replacing this with a more complicated and more brittle scheme.
 
  Dunno, if you think things are better this way, I'm fine with that,
  since both schemes should get the job done. But in the end, adding a
  switch in journald.conf seems more in the systemd spirit of doing the right
  thing automatically and also less work for both sides...
  
  What about this solution: let's go the tmpfiles way, but also add some
  code to the journal file writer to log at INFO level an actionable
  recommendation to turn on the c flag on the directory if we notice
  that the newly created file doesn't have it, and it is located on
  btrfs?
 
 After the work that I done to the tmpfiles, I have to agree with
 Zbyszek. Adding an option to the journal.conf file is the more
 reasonable thing to do.

You mean journald.conf I figure? That's not even read by the remoting
tools, so how is that a solution?

 If we add code that performs only a check in the code of journal, I think 
 that we have the worst solution:
 - journal code is still aware of the NOCOW attribute (== more code complexity)
 - the user had to update/manage a tmpfile.d  manually

Well, again: the nocow thing is a work-around around a design issue
with btrfs, and btrfs is working on correcting that, by adding
auto-defrag to deal better with write patterns such as this.

We should not add new explicit config options for things we already
know *now* that they are a stopgap, and will go away eventually.

With the solution I propose (which is tmpfiles snippet + warning if
non-enabled) we get:

- default behaviour is fast

- default behaviour is easy to override

- specialist users who use the remoting feature and use the thing on a
  non-default directory, are notified about the issue at hand.

- we can easily get rid of it eventually, simply by dropping one
  config line and the generation of a warning. There's no option to
  deprecate then, and keep compat for.

 Let me to suggest the opposite solution:
 - add a switch in the journald.conf file
 - add a check that raise a warning if the NOCOW flag is not-used/used
 

This does not fix the remoting issue, since journald.conf isn't read
by those tools. Also, it adds a setting we'll eventuall have to get
rid of again. 

Sorry, but I am really against a solution like that. I don't want to
litter the config file with options that are hacks and will go away
one day...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-04-12 Thread Lennart Poettering
On Sun, 12.04.15 20:19, Goffredo Baroncelli (kreij...@libero.it) wrote:

  After the work that I done to the tmpfiles, I have to agree with
  Zbyszek. Adding an option to the journal.conf file is the more
  reasonable thing to do.
  
  You mean journald.conf I figure? That's not even read by the remoting
  tools, so how is that a solution?
 
 In my first attempt, I added a switch to the command line.

So we'd even have two new options where we'd know now that they would
go away? And one of them isn't even persistent?

This really sounds wrong. We should be frugal with adding new options,
and this case is extraordinarily weak I think...

 Even if I agree with you about the points above, I am not fully
 convinced about changing the NOCOW attribute via tmpfile snippet:
 it seems to me an overkill solution..
 
 But I prefer the snippet solution to the old behavior (set the NOCOW attribute
 coded in systemd-journald).

If you rebase the patches, and fix the issues I pointed out I am happy
to merge patches that set the c bit on the dirs via tmpfiles, and prints
a warning when creating a new journal file on btrfs where the flag is
off...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-04-11 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Apr 08, 2015 at 11:48:21PM +0200, Lennart Poettering wrote:
 On Sun, 22.03.15 20:53, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote:
 
  On Fri, Mar 20, 2015 at 07:06:28PM +0100, Goffredo Baroncelli wrote:
   Hi Zbyszek,
   
   On 2015-03-21 14:37, Zbigniew Jędrzejewski-Szmek wrote:
On Mon, Mar 16, 2015 at 08:33:52PM +0100, Goffredo Baroncelli wrote:
From: Goffredo Baroncelli kreij...@inwind.it
   
Add a new tmpfiles.d snippets to set the NOCOW attributes for the
journal files. This allow better perfomance when the root file system
is BTRFS. Pay attention that the NOCOW flags disables the checksum and
prevent scrub to rebuild a corrupted journal.
I now merged patches 1-3/4, but not this one. Setting/unsetting
attributes seems to be generally useful, so the rest stands on its
own. The reason I held back with the last patch is that setting of the
attributes through tmpfiles should be added together with the removal
of the same functionality from journald. 
   
   You are right, the patch #4 and the removal of the current code are 
   coupled;
   with the patch #1..#3 included, I will re-issue the #4 with another patch 
   which reverts the code. And the discussion will restart.
   
   
   
But there are some details to
work out.

Setting +C on /var/log/journal/%m has smaller scope than the code in
journal-file.c now. For example it does not cover files opened by
systemd-journal-remote. 
   
   I am not familiar with s*d-journal-remote; from the man page it seems 
   that the log are stored /by default) in /var/log/journal/remote/ ; if so 
   it is sufficient to add a line like
   
   +h /var/log/journal/remote - - - - +C
  
  That's the problem: current functionality works no matter where you
  store the files, but it's hard to provide the same level of
  flexibility with the tmpfiles-based solution.
 
 Well, but we never store files outside of /var/log/journal,
 /var/log/journal/%m and /var/log/journal/remote/, do we? 
We can, if instructed to do so. journal-remote can store files wherever.

Original motivation for this patch was to make the NOCOW on journal files
configurable without too much fuss and without making it an explicit option.
Journal files on btrfs without NOCOW are rather slow, so it seems that most
people will want NOCOW on. But with the proposed patch, people would want
to add the tmpfile snippet to set NOCOW for every location they write too,
which is very visible and requires explicit configuration. Doing this in
journal-file directly was simple, synchronous, and worked everywhere, and
we are replacing this with a more complicated and more brittle scheme.

Dunno, if you think things are better this way, I'm fine with that,
since both schemes should get the job done. But in the end, adding a
switch in journald.conf seems more in the systemd spirit of doing the right
thing automatically and also less work for both sides...

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-04-08 Thread Lennart Poettering
On Sun, 22.03.15 20:53, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote:

 On Fri, Mar 20, 2015 at 07:06:28PM +0100, Goffredo Baroncelli wrote:
  Hi Zbyszek,
  
  On 2015-03-21 14:37, Zbigniew Jędrzejewski-Szmek wrote:
   On Mon, Mar 16, 2015 at 08:33:52PM +0100, Goffredo Baroncelli wrote:
   From: Goffredo Baroncelli kreij...@inwind.it
  
   Add a new tmpfiles.d snippets to set the NOCOW attributes for the
   journal files. This allow better perfomance when the root file system
   is BTRFS. Pay attention that the NOCOW flags disables the checksum and
   prevent scrub to rebuild a corrupted journal.
   I now merged patches 1-3/4, but not this one. Setting/unsetting
   attributes seems to be generally useful, so the rest stands on its
   own. The reason I held back with the last patch is that setting of the
   attributes through tmpfiles should be added together with the removal
   of the same functionality from journald. 
  
  You are right, the patch #4 and the removal of the current code are coupled;
  with the patch #1..#3 included, I will re-issue the #4 with another patch 
  which reverts the code. And the discussion will restart.
  
  
  
   But there are some details to
   work out.
   
   Setting +C on /var/log/journal/%m has smaller scope than the code in
   journal-file.c now. For example it does not cover files opened by
   systemd-journal-remote. 
  
  I am not familiar with s*d-journal-remote; from the man page it seems that 
  the log are stored /by default) in /var/log/journal/remote/ ; if so it is 
  sufficient to add a line like
  
  +h /var/log/journal/remote - - - - +C
 
 That's the problem: current functionality works no matter where you
 store the files, but it's hard to provide the same level of
 flexibility with the tmpfiles-based solution.

Well, but we never store files outside of /var/log/journal,
/var/log/journal/%m and /var/log/journal/remote/, do we? 

I think this is close enough to be useful.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-03-21 Thread Goffredo Baroncelli
On 2015-03-22 20:53, Zbigniew Jędrzejewski-Szmek wrote:
 On Fri, Mar 20, 2015 at 07:06:28PM +0100, Goffredo Baroncelli wrote:
 Hi Zbyszek,

[...]
 But there are some details to
 work out.

 Setting +C on /var/log/journal/%m has smaller scope than the code in
 journal-file.c now. For example it does not cover files opened by
 systemd-journal-remote. 

 I am not familiar with s*d-journal-remote; from the man page it seems that 
 the log are stored /by default) in /var/log/journal/remote/ ; if so it is 
 sufficient to add a line like

 +h /var/log/journal/remote - - - - +C
 
 That's the problem: current functionality works no matter where you
 store the files, but it's hard to provide the same level of
 flexibility with the tmpfiles-based solution.

Unfortunately the +C attributes has his downside, which cannot be ignored. All 
my work was due to the fact that the NOCOW attribute was set unconditionally. I 
proposed a patches set which adds an option to tune this behavior; Lennart 
asked to replace it with this tmpfile.d solution.

Frankly speaking, I think that it would be doable also to set the -C attributes 
by hand by the user/sysadmin[1]. My needing is only to avoid this 
*unconditionally* NOCOW attribute set, for these few cases (BTRFS w/RAID) where 
it could degrades the btrfs features ( without notifying the user !).

 
 Zbyszek
 

Goffredo

[1] It is needed only one time; after you set as +C the directory all the new 
files
inherits this attribute.  

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli kreijackATinwind.it
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli kreijackATinwind.it
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-03-20 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Mar 20, 2015 at 07:06:28PM +0100, Goffredo Baroncelli wrote:
 Hi Zbyszek,
 
 On 2015-03-21 14:37, Zbigniew Jędrzejewski-Szmek wrote:
  On Mon, Mar 16, 2015 at 08:33:52PM +0100, Goffredo Baroncelli wrote:
  From: Goffredo Baroncelli kreij...@inwind.it
 
  Add a new tmpfiles.d snippets to set the NOCOW attributes for the
  journal files. This allow better perfomance when the root file system
  is BTRFS. Pay attention that the NOCOW flags disables the checksum and
  prevent scrub to rebuild a corrupted journal.
  I now merged patches 1-3/4, but not this one. Setting/unsetting
  attributes seems to be generally useful, so the rest stands on its
  own. The reason I held back with the last patch is that setting of the
  attributes through tmpfiles should be added together with the removal
  of the same functionality from journald. 
 
 You are right, the patch #4 and the removal of the current code are coupled;
 with the patch #1..#3 included, I will re-issue the #4 with another patch 
 which reverts the code. And the discussion will restart.
 
 
 
  But there are some details to
  work out.
  
  Setting +C on /var/log/journal/%m has smaller scope than the code in
  journal-file.c now. For example it does not cover files opened by
  systemd-journal-remote. 
 
 I am not familiar with s*d-journal-remote; from the man page it seems that 
 the log are stored /by default) in /var/log/journal/remote/ ; if so it is 
 sufficient to add a line like
 
 +h /var/log/journal/remote - - - - +C

That's the problem: current functionality works no matter where you
store the files, but it's hard to provide the same level of
flexibility with the tmpfiles-based solution.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-03-20 Thread Goffredo Baroncelli
Hi Zbyszek,

On 2015-03-21 14:37, Zbigniew Jędrzejewski-Szmek wrote:
 On Mon, Mar 16, 2015 at 08:33:52PM +0100, Goffredo Baroncelli wrote:
 From: Goffredo Baroncelli kreij...@inwind.it

 Add a new tmpfiles.d snippets to set the NOCOW attributes for the
 journal files. This allow better perfomance when the root file system
 is BTRFS. Pay attention that the NOCOW flags disables the checksum and
 prevent scrub to rebuild a corrupted journal.
 I now merged patches 1-3/4, but not this one. Setting/unsetting
 attributes seems to be generally useful, so the rest stands on its
 own. The reason I held back with the last patch is that setting of the
 attributes through tmpfiles should be added together with the removal
 of the same functionality from journald. 

You are right, the patch #4 and the removal of the current code are coupled;
with the patch #1..#3 included, I will re-issue the #4 with another patch which 
reverts the code. And the discussion will restart.



 But there are some details to
 work out.
 
 Setting +C on /var/log/journal/%m has smaller scope than the code in
 journal-file.c now. For example it does not cover files opened by
 systemd-journal-remote. 

I am not familiar with s*d-journal-remote; from the man page it seems that the 
log are stored /by default) in /var/log/journal/remote/ ; if so it is 
sufficient to add a line like

+h /var/log/journal/remote - - - - +C



 Having the files no-cow is just as useful for those,
 but it's not entirely clear how to support it in the new scheme.
 
 Zbyszek
 
 +# set the journal file as NOCOW; only valid for BTRFS filesystem
 +h /var/log/journal/%m - - - - +C
 


-- 
gpg @keyserver.linux.it: Goffredo Baroncelli kreijackATinwind.it
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-03-19 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Mar 16, 2015 at 08:33:52PM +0100, Goffredo Baroncelli wrote:
 From: Goffredo Baroncelli kreij...@inwind.it
 
 Add a new tmpfiles.d snippets to set the NOCOW attributes for the
 journal files. This allow better perfomance when the root file system
 is BTRFS. Pay attention that the NOCOW flags disables the checksum and
 prevent scrub to rebuild a corrupted journal.
I now merged patches 1-3/4, but not this one. Setting/unsetting
attributes seems to be generally useful, so the rest stands on its
own. The reason I held back with the last patch is that setting of the
attributes through tmpfiles should be added together with the removal
of the same functionality from journald. But there are some details to
work out.

Setting +C on /var/log/journal/%m has smaller scope than the code in
journal-file.c now. For example it does not cover files opened by
systemd-journal-remote. Having the files no-cow is just as useful for those,
but it's not entirely clear how to support it in the new scheme.

Zbyszek

 +# set the journal file as NOCOW; only valid for BTRFS filesystem
 +h /var/log/journal/%m - - - - +C
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-03-16 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it

Add a new tmpfiles.d snippets to set the NOCOW attributes for the
journal files. This allow better perfomance when the root file system
is BTRFS. Pay attention that the NOCOW flags disables the checksum and
prevent scrub to rebuild a corrupted journal.
---
 tmpfiles.d/journal-nocow.conf | 12 
 1 file changed, 12 insertions(+)
 create mode 100644 tmpfiles.d/journal-nocow.conf

diff --git a/tmpfiles.d/journal-nocow.conf b/tmpfiles.d/journal-nocow.conf
new file mode 100644
index 000..43a4f2b
--- /dev/null
+++ b/tmpfiles.d/journal-nocow.conf
@@ -0,0 +1,12 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+
+# set the journal file as NOCOW; only valid for BTRFS filesystem
+h /var/log/journal/%m - - - - +C
-- 
2.1.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-03-12 Thread Goffredo Baroncelli
Add a new tmpfiles.d snippets to set the NOCOW attributes for the
journal files. This allow better perfomance when the root file system
is BTRFS. Pay attention that the NOCOW flags disables the checksum and
prevent scrub to rebuild a corrupted journal.
---
 tmpfiles.d/journal-nocow.conf | 12 
 1 file changed, 12 insertions(+)
 create mode 100644 tmpfiles.d/journal-nocow.conf

diff --git a/tmpfiles.d/journal-nocow.conf b/tmpfiles.d/journal-nocow.conf
new file mode 100644
index 000..43a4f2b
--- /dev/null
+++ b/tmpfiles.d/journal-nocow.conf
@@ -0,0 +1,12 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+
+# set the journal file as NOCOW; only valid for BTRFS filesystem
+h /var/log/journal/%m - - - - +C
-- 
2.1.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 4/4] Add a new tmpfiles.d snippets to set the NOCOW the journal.

2015-03-10 Thread Goffredo Baroncelli
Add a new tmpfiles.d snippets to set the NOCOW attributes for the
journal files. This allow better perfomance when the root file system
is BTRFS. Pay attention that the NOCOW flags disables the checksum and
prevent scrub to rebuild a corrupted journal.
---
 tmpfiles.d/journal-nocow.conf | 12 
 1 file changed, 12 insertions(+)
 create mode 100644 tmpfiles.d/journal-nocow.conf

diff --git a/tmpfiles.d/journal-nocow.conf b/tmpfiles.d/journal-nocow.conf
new file mode 100644
index 000..43a4f2b
--- /dev/null
+++ b/tmpfiles.d/journal-nocow.conf
@@ -0,0 +1,12 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+
+# set the journal file as NOCOW; only valid for BTRFS filesystem
+h /var/log/journal/%m - - - - +C
-- 
2.1.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel