Re: logrotate(8) and copytruncate as default

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

 



On Thu, Jun 27, 2013 at 6:57 PM, Miloslav Trmač <mitr@xxxxxxxx> wrote:
> On Thu, Jun 27, 2013 at 6:49 PM, Jan Kaluza <jkaluza@xxxxxxxxxx> wrote:
>> I have the same opinion for now, but I will at least try to evaluate
>> that locking idea. Maybe it can end up like more reliable
>> copytruncate directive.
>
> I've been looking at that option - AFAICS mandatory file locking, at
> least currently, doesn't work reliably with O_APPEND
> (rw_verify_area->locks_mandatory_area doesn't use the O_APPEND flag at
> all).
... which is irrelevant, as long as _some_ range is validated, the
write will block if the whole file is locked.  The necessary guarantee
is that O_APPEND is evaluated only after after the blocked writer is
unblocked, so that the log writer starts writing from the start of the
file again.  From my, generally ignorant, reading of the kernel
source, this is what actually happens (in generic_write_checks()), so
the mandatory locking should actually work.
    Mirek
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux