lkml.org 
[lkml]   [2005]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: ctime set by truncate even if NOCMTIME requested
    From
    Date
    > See the discussion on this a couple of weeks back.
    >
    > It is quite correct for the kernel to request that the filesystem set
    > ctime/mtime on successful calls to open(O_TRUNC).
    > http://www.opengroup.org/onlinepubs/009695399/toc.htm
    >
    > It is _incorrect_ for it to request that ctime/mtime be set (or that the
    > suid/sgid mode bit be cleared) if a truncate()/ftruncate() call results
    > in no size change.
    > http://www.opengroup.org/onlinepubs/009695399/toc.htm
    >
    > So the current do_truncate() does have to be changed. Adding a check for
    > IS_NOCMTIME would be wrong, though.

    These are othogonal problems.

    IS_NOCMTIME is the filesystem's way of saying that it doesn't need
    ->setattr on truncate(), write(), etc. Why? Because it can do the
    [cm]time change implicitly _within_ the operation.

    If IS_NOCMTIME is set, the only place where the filesystem should get
    ATTR_MTIME or ATTR_CTIME (and for that matter ATTR_MTIME_SET) is from
    sys_utime[s].

    Miklos
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-09-20 12:06    [W:0.027 / U:66.104 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site