bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] mv: do not produce diagnostics for xattr/selinux preserving


From: Ondřej Vašík
Subject: Re: [PATCH] mv: do not produce diagnostics for xattr/selinux preserving failures
Date: Fri, 17 Apr 2009 14:39:29 +0200

Jim Meyering píše v Pá 17. 04. 2009 v 13:54 +0200:
> Ondřej Vašík wrote:
> > as reported in rhbz #496142 by Eric Sandeen, mv produces a lot of
> > unwanted messages when moving files to filesystem without xattr support.
> > I guess mv selinux/xattr diagnostic error messages should be reduced as
> > is done for cp -a, attached patch should do that.
> ...
> > +  mv: do not produce diagnostic errors for preserving xattr's to
> > +  prevent message spam on file systems without xattr support.
> 
> Thanks for the patch, but mv's charter is stricter than that of cp -a.
> I.e., people expect mv to preserve all attributes when the source
> and destination are on the same file system, so IMHO, failure to
> preserve any attribute (e.g., for an inter-device mv) requires
> _some_ diagnosis.

  Ok, reduce_diagnostics only reduces diagnostic messages for recently
added SELinux and xattrs which were completely ignored in the past - so
I don't think that people expect mv to preserve them all the time.
SELinux preserving failures were already suppresed in mv for ENOTSUP and
ENODATA in the past and as xattrs are similar and were added just few
months ago, it could be handled same way. However the situation slightly
differs - as SELinux preserving diagnostics are handled directly by
copy.c and xattrs preserving are handled by libattr - so there is no
easy way how to suppress at least ENOTSUP and ENODATA type errors like
done for SELinux.

> However, when there are many files, and mv is failing to preserve some
> attribute repeatedly, it would make sense to print only the first N
> such diagnostics, and then for the N+1st, print one more saying that
> there have been additional attribute-preservation failures, but mv will
> not display any more.

Changing proposed patch to not display diagnostics for ENODATA and
ENOTSUP errno's - as is done for mv and SELinux contexts.

Proposed patch attached... 

Greetings,
          Ondřej

Attachment: mvreducediagnostics.patch
Description: Text Data

Attachment: signature.asc
Description: Toto je digitálně podepsaná část zprávy


reply via email to

[Prev in Thread] Current Thread [Next in Thread]