[systemd-devel] [PATCH] journal: fix Inappropriate ioctl for device on ext4

Ivan Shapovalov intelfx100 at gmail.com
Sun Mar 1 16:58:48 PST 2015


On 2015-03-01 at 21:13 -0300, Cristian Rodríguez wrote:
> Logs constantly show
> 
> systemd-journald[395]: Failed to set file attributes: Inappropriate
> ioctl for device
> 
> This is because ext4 does not support FS_NOCOW_FL.
> ---
>  src/journal/journal-file.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
> index 9c9a548..ecabfd3 100644
> --- a/src/journal/journal-file.c
> +++ b/src/journal/journal-file.c
> @@ -2610,7 +2610,8 @@ int journal_file_open(
>                   * checksumming). */
>                  r = chattr_fd(f->fd, true, FS_NOCOW_FL);
>                  if (r < 0)
> -                        log_warning_errno(errno, "Failed to set file attributes: %m");
> +                        if(r != -ENOTTY)

Maybe it's better to just say if (r < 0 && r != -ENOTTY) here?

Just nitpicking,
-- 
Ivan Shapovalov / intelfx /

> +                                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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150302/1345c59f/attachment.sig>


More information about the systemd-devel mailing list