Re: [systemd-devel] experiments with 'minimal build'

2015-03-21 Thread Michael Olbrich
On Thu, Mar 19, 2015 at 11:37:41PM -0700, Alison Chaiken wrote:
 Jeff Waugh:
 The last + is +SYSVINIT, but there doesn't appear to be a configure option
 to disable sysvinit compatibility anymore.
 
 I was wondering about that myself.

Try --with-sysvinit-path= --with-sysvrcnd-path=. That should disable it.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
___
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] is-enabled does not work

2015-03-21 Thread Michael Chapman

On Fri, 20 Mar 2015, Cecil Westerhof wrote:

​When executing on a Debian system:
   systemctl is-enabled atd.service

I get:​
   Failed to issue method call: No such file or directory

On a openSUSE system it works without a hitch. What could be the reason it
does not work on the Debian systems?


I'm pretty sure you're hitting this bug:

  https://bugs.debian.org/751638

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


[systemd-devel] [PATCH 1/2] Revert patch 11689d2a which force the NOCOW attribute

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

Revert patch 11689d2a, which force the NOCOW attribute for the journal files.
This patch was introduced to allievate the perfomances problem that
journald shows on the BTRFS filesystem.

Because the NOCOW attribute is forced the user can't revert to
the old behavior. However NOCOW attribute disables the btrfs checksums, which
prevent BTRFS to rebuild a currupted file in an RAIDx filesystem.

To continue to set the NOCOW attribute, use the h|H command of systemd-tmpfile.
---
 src/journal/journal-file.c | 28 ++--
 src/journal/journalctl.c   | 12 
 2 files changed, 10 insertions(+), 30 deletions(-)

diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 2845e05..9d56069 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -26,7 +26,6 @@
 #include sys/statvfs.h
 #include fcntl.h
 #include stddef.h
-#include linux/fs.h
 
 #include btrfs-util.h
 #include journal-def.h
@@ -142,17 +141,8 @@ void journal_file_close(JournalFile *f) {
 if (f-mmap  f-fd = 0)
 mmap_cache_close_fd(f-mmap, f-fd);
 
-if (f-fd = 0  f-defrag_on_close) {
-
-/* Be friendly to btrfs: turn COW back on again now,
- * and defragment the file. We won't write to the file
- * ever again, hence remove all fragmentation, and
- * reenable all the good bits COW usually provides
- * (such as data checksumming). */
-
-(void) chattr_fd(f-fd, false, FS_NOCOW_FL);
-(void) btrfs_defrag_fd(f-fd);
-}
+if (f-fd = 0  f-defrag_on_close)
+btrfs_defrag_fd(f-fd);
 
 safe_close(f-fd);
 free(f-path);
@@ -2602,18 +2592,6 @@ int journal_file_open(
 goto fail;
 
 if (f-last_stat.st_size == 0  f-writable) {
-
-/* Before we write anything, turn off COW logic. Given
- * our write pattern that is quite unfriendly to COW
- * file systems this should greatly improve
- * performance on COW file systems, such as btrfs, at
- * the expense of data integrity features (which
- * shouldn't be too bad, given that we do our own
- * checksumming). */
-r = chattr_fd(f-fd, true, FS_NOCOW_FL);
-if (r  0)
-log_warning_errno(errno, Failed to set file 
attributes: %m);
-
 /* Let's attach the creation time to the journal file,
  * so that the vacuuming code knows the age of this
  * file even if the file might end up corrupted one
@@ -2831,8 +2809,6 @@ int journal_file_open_reliably(
 
 /* btrfs doesn't cope well with our write pattern and
  * fragments heavily. Let's defrag all files we rotate */
-
-(void) chattr_path(p, false, FS_NOCOW_FL);
 (void) btrfs_defrag(p);
 
 log_warning(File %s corrupted or uncleanly shut down, renaming and 
replacing., fname);
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 55c7786..abb9d0c 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1290,7 +1290,7 @@ static int setup_keys(void) {
 size_t mpk_size, seed_size, state_size, i;
 uint8_t *mpk, *seed, *state;
 ssize_t l;
-int fd = -1, r;
+int fd = -1, r, attr = 0;
 sd_id128_t machine, boot;
 char *p = NULL, *k = NULL;
 struct FSSHeader h;
@@ -1385,9 +1385,13 @@ static int setup_keys(void) {
 
 /* Enable secure remove, exclusion from dump, synchronous
  * writing and in-place updating */
-r = chattr_fd(fd, true, 
FS_SECRM_FL|FS_NODUMP_FL|FS_SYNC_FL|FS_NOCOW_FL);
-if (r  0)
-log_warning_errno(errno, Failed to set file attributes: %m);
+if (ioctl(fd, FS_IOC_GETFLAGS, attr)  0)
+log_warning_errno(errno, FS_IOC_GETFLAGS failed: %m);
+
+attr |= FS_SECRM_FL|FS_NODUMP_FL|FS_SYNC_FL|FS_NOCOW_FL;
+
+if (ioctl(fd, FS_IOC_SETFLAGS, attr)  0)
+log_warning_errno(errno, FS_IOC_SETFLAGS failed: %m);
 
 zero(h);
 memcpy(h.signature, KSHHRHLP, 8);
-- 
2.1.4

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


[systemd-devel] [PATCH 2/2] Add +C attrib to the journal files directories

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

Add +C attrib to the journal files directories. The journal file format
behaves bad on a BTRFS filesystem: the performances decrease during the
time.
To avoid this issue, this tmpfile.d snippet sets the NOCOW attribute to the
journal files directories, so newly created journal files inherit the NCOOW
attribute.

Be aware that the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
to rebuild a corrupted file in a RAIDx filesystem. However the perfomances
increase.
In a single disk filesystem (or a filesystem without redundancy) it is safe
to use the NOCOW flags.
---
 tmpfiles.d/journal-nocow.conf | 19 +++
 1 file changed, 19 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..8d9c1e8
--- /dev/null
+++ b/tmpfiles.d/journal-nocow.conf
@@ -0,0 +1,19 @@
+#  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; make sense only for BTRFS filesystem
+# WARNING: the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
+#  to rebuild a corrupted file in a RAIDx filesystem. It is suggested
+#  to disables these setting in this kind of filesystem.
+#  However in a single disk filesystem (or a filesystem without 
+#  redundancy) it is safe to use the NOCOW flag.
+#  Setting the NOCOW flag the perfomances increase.
+
+h /var/log/journal/%m - - - - +C
+h /var/log/journal/remote - - - - +C
-- 
2.1.4

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


[systemd-devel] [PATCH] Set the NOCOW flag for the journal via tmpfiles

2015-03-21 Thread Goffredo Baroncelli

Hi all,

these patches set reverts the commit 11689d2 journald: turn off COW for
journal files on btrfs which enables *unconditionally* the NOCOW flag for the
journal files. The reason was that the performances of the journal file format
are very bad on btrfs, and decrease during the time. Disabling the COW
behavior, the perfomances increase.
Unfortunately disabling the COW behavior leads to disable the BTRFS checksums,
which in turn prevents BTRFS to rebuild a corrupted file in a RAID
filesystem [3].

To avoid that I proposed a patch which introduces a configurable option to
disables the turn off COW behavior[1]. Lennart commented that instead he
prefer to set the NOCOW attribute via tmpfile.d snippets.

A further patches set was proposed and accepted [2] to extend systemd-tmpfiles
to change the file attributes.

This last patches set removes the turn off COW behavior (patch #1) and
introduces a new tmpfiles.d snippet which enable the NOCOW beahvior for the
journal files (patch #2). So a sysadmin can disable this setting overriding
this file configuration.

BR
G.Baroncelli


[1] Re: [systemd-devel] [RFC][PATCH] Add option to enable COW for journal file
https://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg28724.html

[2] 
https://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg29313.html

[3] http://en.wikipedia.org/wiki/Btrfs#Checksum_tree_and_scrubbing

--
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] libsystemd doesn't handle properly empty messages from kernel

2015-03-21 Thread Zbigniew Jędrzejewski-Szmek
On Wed, Mar 18, 2015 at 05:06:18AM -0700, Alin Rauta wrote:
 Hi,
 
 Systemd strips out NLMSG_DONE piece from a multi-part message adding into the 
 receive queue only the messages containing actual data.
 
 If we send a request to the kernel for getting the forwarding database table 
 (just an example),
 the response will be a multi-part message like below:
 1. FDB entry 1;
 2. FDB entry 2;
 3. NLMSG_DONE;
 
 libsystemd strips out 3. NLMSG_DONE; part and places into the receive queue 
 a pointer to 1. FDB entry 1;.
 
 But if the FDB table is empty, the respose from the kernel will look like 
 below:
 1. NLMSG_DONE;
 
 libsystemd strips out 1. NLMSG_DONE; part and since there is no actual data 
 got, it continues waiting until reaching timeout.
 
 Therefore, a call to sd_rtnl_call to send and wait for a response from 
 kernel will exit with timeout
 which is interpreted as error in communication.
 
 The patch I've attached, adds 1. NLMSG_DONE; to the receive queue only when 
 getting empty response from kernel.
 This way, a call like sd_rtnl_call will not block anymore.
 
 It works fine, but it may be just an workaround. Let me know what you think.
This text should really be part of the commit.

Dunno, this looks like it would work, but I'm not sure if this is the best
way to do it. Tom?

Zbyszek

 Alin Rauta (1):
   libsystemd doesn't handle properly empty messages from kernel
 
  src/libsystemd/sd-rtnl/rtnl-message.c |  4 +++-
  src/libsystemd/sd-rtnl/rtnl-types.c   |  1 +
  src/libsystemd/sd-rtnl/sd-rtnl.c  | 14 ++
  3 files changed, 18 insertions(+), 1 deletion(-)
 
 -- 
 1.9.3
 
 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] drop-ins and watchdogs question

2015-03-21 Thread Alison Chaiken
Typing

 modprobe softdog soft_noboot=0
 watchdog-test -e

turns on the kernel's softdog timer.'sudo lsof /dev/watchdog'
shows no readers, as expected, and system will reboot.   With a
system.conf file in /run/systemd/system.conf.d that contains the singe
uncommented line

 RuntimeWatchdogSec=60

then typing

systemctl daemon-reexec
lsof /dev/watchdog

shows that systemd is holding the file open, and the system does not
reboot: perfect.

To stop systemd from petting the dog, I create a new system.conf file that has

 RuntimeWatchdogSec=0

and type 'systemctl daemon-reexec'.   As expected, 'sudo lsof
/dev/watchdog' shows no one is holding file open.   However, the
system does not reboot!I'm not sure if this is because of the way
that the softdog works, or because I haven't overridden the property
properly.I can see that if I just removed the
/run/systemd/system.conf file, that RuntimeWatchdogSec should be
unchanged upon daemon-reexec, but I would think that manually
overriding it by setting it to zero should have the intended result
here.   Which leads to the questions:

-- Is there a way to get systemd to dump what values it's using for
the variables in system.conf?   'systemctl show-environment' doesn't
do it.

-- In a realistic situation, how would drop-in configuration files in
/run/systemd be created?   I guess a script in the initrd could do it.
   Presumably configuration of a feature like a watchdog that is
needed early in boot is better handled through
/etc/systemd/system.conf.

Thanks,
Alison

-- 
Alison Chaiken   ali...@she-devel.com
650-279-5600
http://{she-devel.com,exerciseforthereader.org}
One consumes a great deal of silence in the course of becoming
educated. -- Matthew B. Crawford
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] missing.h: add more btrfs types and defines

2015-03-21 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Mar 19, 2015 at 02:48:24PM +0100, Michael Olbrich wrote:
 On Thu, Mar 19, 2015 at 02:05:00PM +0100, David Herrmann wrote:
  On Wed, Mar 18, 2015 at 2:04 PM, Michael Olbrich
  m.olbr...@pengutronix.de wrote:
   it seems we're getting a lot of btrfs stuff here. Maybe we should ship a
   copy of btrfs.h instead?
  
  All these definitions where introduced with linux-3.8 (well, the
  header was moved to linux/btrfs.h at that time). Our current
  requirement is linux-3.7. I'd just say, lets require linux-headers-3.8
  at build-time?
 
 Actually, that would be 3.9 not 3.8. And I'd really like to avoid such a
 dependency. When cross-compiling for embedded systems, a host
 'systemd-hwdb' is needed to generate the hwdb. And build servers often run
 older Distributions (e.g. Debian stable).
Bumping the minimum kernel version will happen sooner or later, but
the btrfs headers don't seem to be an important enough reason. Since
we already have this patch, let's just use it.

Applied.

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


Re: [systemd-devel] drop-ins and watchdogs question

2015-03-21 Thread Mantas Mikulėnas
On Sat, Mar 21, 2015 at 10:07 PM, Alison Chaiken ali...@she-devel.com
wrote:
 To stop systemd from petting the dog, I create a new system.conf file
that has

  RuntimeWatchdogSec=0

 and type 'systemctl daemon-reexec'.   As expected, 'sudo lsof
 /dev/watchdog' shows no one is holding file open.   However, the
 system does not reboot!

I *think* systemd closes the watchdog device cleanly when you disable it
via config, so the hardware timeout is no longer 'active'. Would be quite
surprising to the user, if it didn't.

Try suspending systemd (SIGSTOP) or crashing it (SIGSEGV).

-- 
Mantas Mikulėnas graw...@gmail.com
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Is there trouble with git://anongit.freedesktop.org/systemd/systemd ?

2015-03-21 Thread Tobias Hunger
Hi!

I get

fatal: unable to connect to anongit.freedesktop.org:
anongit.freedesktop.org[0: 131.252.210.161]: errno=Connection refused

all day long now.

Is there something wrong with the git server or did I break something locally?

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


Re: [systemd-devel] [PATCH] Create journal-remote.conf.xml to document the format of the configuration file for systemd-journal-remote

2015-03-21 Thread Michael Biebl
systemd-journal-remote is an optional component.
Please mark the man page as conditional as well and rebuild
Makefile-man.accordingly.

For example, see
http://cgit.freedesktop.org/systemd/systemd/tree/man/coredump.conf.xml#n24


2015-03-16 13:49 GMT+01:00 Chris Morgan chmor...@gmail.com:
 ---
  man/journal-remote.conf.xml| 111 
 +
  man/systemd-journal-remote.xml |   1 +
  2 files changed, 112 insertions(+)
  create mode 100644 man/journal-remote.conf.xml

 diff --git a/man/journal-remote.conf.xml b/man/journal-remote.conf.xml
 new file mode 100644
 index 000..84e07ee
 --- /dev/null
 +++ b/man/journal-remote.conf.xml
 @@ -0,0 +1,111 @@
 +?xml version='1.0'? !--*-nxml-*--
 +!DOCTYPE refentry PUBLIC -//OASIS//DTD DocBook XML V4.2//EN
 +  http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd;
 +
 +!--
 +  This file is part of systemd.
 +
 +  Copyright 2015 Chris Morgan
 +
 +  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.
 +
 +  systemd is distributed in the hope that it will be useful, but
 +  WITHOUT ANY WARRANTY; without even the implied warranty of
 +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 +  Lesser General Public License for more details.
 +
 +  You should have received a copy of the GNU Lesser General Public License
 +  along with systemd; If not, see http://www.gnu.org/licenses/.
 +--
 +
 +refentry id=journal-remote.conf
 +xmlns:xi=http://www.w3.org/2001/XInclude;
 +  refentryinfo
 +titlejournal-remote.conf/title
 +productnamesystemd/productname
 +
 +authorgroup
 +  author
 +contribDeveloper/contrib
 +firstnameChris/firstname
 +surnameMorgan/surname
 +emailchmor...@gmail.com/email
 +  /author
 +/authorgroup
 +  /refentryinfo
 +
 +  refmeta
 +refentrytitlejournal-remote.conf/refentrytitle
 +manvolnum5/manvolnum
 +  /refmeta
 +
 +  refnamediv
 +refnamejournal-remote.conf/refname
 +refpurposeJournal remote service configuration files/refpurpose
 +  /refnamediv
 +
 +  refsynopsisdiv
 +parafilename/etc/systemd/journal-remote.conf/filename/para
 +parafilename/etc/journal-remote.conf/filename/para
 +parafilename/run/journal-remote.conf/filename/para
 +parafilename/usr/local/lib/journal-remote.conf/filename/para
 +parafilename/usr/lib/journal-remote.conf/filename/para
 +  /refsynopsisdiv
 +
 +  refsect1
 +titleDescription/title
 +
 +paraThese files configure various parameters of the 
 systemd-remote-journal
 +application,
 +
 citerefentryrefentrytitlesystemd-journal-remote/refentrytitlemanvolnum8/manvolnum/citerefentry./para
 +
 +  /refsect1
 +
 +  refsect1
 +titleOptions/title
 +
 +paraAll options are configured in the
 +literal[Journal]/literal section:/para
 +
 +variablelist
 +
 +  varlistentry
 +termvarnameSplitMode=/varname/term
 +
 +listitemparaOne of literalhost/literal or 
 literalnone/literal.
 +/para/listitem
 +  /varlistentry
 +
 +  varlistentry
 +termvarnameServerKeyFile=/varname/term
 +
 +listitemparaSSL key in PEM format/para/listitem
 +  /varlistentry
 +
 +  varlistentry
 +termvarnameServerCertificateFile=/varname/term
 +
 +listitemparaSSL CA certificate in PEM format./para/listitem
 +  /varlistentry
 +
 +  varlistentry
 +termvarnameTrustedCertificateFile=/varname/term
 +
 +listitemparaSSL CA certificate./para/listitem
 +  /varlistentry
 +
 +/variablelist
 +
 +  /refsect1
 +
 +  refsect1
 +  titleSee Also/title
 +  para
 +
 citerefentryrefentrytitlesystemd-journal-remote/refentrytitlemanvolnum1/manvolnum/citerefentry
 +  /para
 +  /refsect1
 +
 +/refentry
 diff --git a/man/systemd-journal-remote.xml b/man/systemd-journal-remote.xml
 index 2687662..d5bda63 100644
 --- a/man/systemd-journal-remote.xml
 +++ b/man/systemd-journal-remote.xml
 @@ -310,6 +310,7 @@ systemd-journal-remote --url http://some.host:19531/

 citerefentryrefentrytitlejournalctl/refentrytitlemanvolnum1/manvolnum/citerefentry,

 citerefentryrefentrytitlesystemd-journald.service/refentrytitlemanvolnum8/manvolnum/citerefentry,

 citerefentryrefentrytitlesystemd-journal-gatewayd.service/refentrytitlemanvolnum8/manvolnum/citerefentry
 +  
 citerefentryrefentrytitlejournal-remote.conf/refentrytitlemanvolnum5/manvolnum/citerefentry
  /para
/refsect1
  /refentry
 --
 2.1.0

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



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Re: [systemd-devel] Is there trouble with git://anongit.freedesktop.org/systemd/systemd ?

2015-03-21 Thread Andrei Borzenkov
В Sun, 22 Mar 2015 00:23:07 +0100
Tobias Hunger tobias.hun...@gmail.com пишет:

 Hi!
 
 I get
 
 fatal: unable to connect to anongit.freedesktop.org:
 anongit.freedesktop.org[0: 131.252.210.161]: errno=Connection refused
 
 all day long now.
 

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


Re: [systemd-devel] [PATCH] fstab-generator: Support root on tmpfs

2015-03-21 Thread Andrei Borzenkov
В Sun, 22 Mar 2015 00:57:23 +0100
Tobias Hunger tobias.hun...@gmail.com пишет:

  src/fstab-generator/fstab-generator.c | 12 +++-
  1 file changed, 11 insertions(+), 1 deletion(-)
 
 diff --git a/src/fstab-generator/fstab-generator.c 
 b/src/fstab-generator/fstab-generator.c
 index ccc7c6e..6b9719b 100644
 --- a/src/fstab-generator/fstab-generator.c
 +++ b/src/fstab-generator/fstab-generator.c
 @@ -145,6 +145,10 @@ static bool mount_in_initrd(struct mntent *me) {
 streq(me-mnt_dir, /usr);
  }
  
 +static bool type_is_tmpfs(char *type) {
 +return !isempty(type)  streq(type, tmpfs);
 +}
 +
  static int add_mount(
  const char *what,
  const char *where,
 @@ -388,13 +392,19 @@ static int add_root_mount(void) {
  _cleanup_free_ char *what = NULL;
  const char *opts;
  
 +if (type_is_tmpfs(arg_root_fstype)) {
 +/* normalize what to mount to tmpfs */
 +if (free_and_strdup(arg_root_what, tmpfs)  0)
 +return log_oom();
 +}

Following code makes sense only for real device, so

   else {

 +
  if (isempty(arg_root_what)) {
  log_debug(Could not find a root= entry on the kernel 
 command line.);
  return 0;
  }
  
  what = fstab_node_to_udev_node(arg_root_what);
 -if (!path_is_absolute(what)) {
 +if (!path_is_absolute(what)  !type_is_tmpfs(what)) {

... which makes this type_is_tmpfs() redundant

  log_debug(Skipping entry what=%s where=/sysroot type=%s, 
 what, strna(arg_root_fstype));
  return 0;
  }

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