Re: Unify self heal doesn't keep file times

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

 



Hi,

The previous patch does not compile in FreeBSD as I used a non
standard part of the stat structure.

Here's the fix against 2.0.0r18 to make it compile in FreeBSD (and
possibly other POSIX systems).

--- posix.c.orig        2009-02-16 21:10:36.963597828 +0100
+++ posix.c     2009-02-16 21:11:05.587603273 +0100
@@ -2864,8 +2864,8 @@
         */

        if (!S_ISLNK (entry->buf.st_mode)) {
-               tv[0].tv_sec = entry->buf.st_atim.tv_sec;
-               tv[1].tv_sec = entry->buf.st_mtim.tv_sec;
+               tv[0].tv_sec = entry->buf.st_atime;
+               tv[1].tv_sec = entry->buf.st_mtime;
                ret = utimes (pathname, tv);
                if (ret == -1) {
                        op_ret = -errno;

Filipe

On Sat, Jan 31, 2009 at 06:09, Anand Avati <avati@xxxxxxxxxxxxx> wrote:
> Committed (with some minor changes). Thanks! There is no sensible way
> to set ctime.
>
> Avati
>
> On Mon, Jan 26, 2009 at 9:48 PM, Filipe Maia <filipe@xxxxxxxxxxxxxx> wrote:
>> Hi,
>>
>> When doing self heal the access and modification times are not
>> preserved. This can have bad consequences for certain applications
>> (e.g. make).
>> The attached patch tries to fix this.
>> It doesn't set ctime as is impossible to do in a portable way.
>>
>> I also noticed that removing the namespace with glusterfsd running
>> results in glusterfsd getting confused. It has to be restarted for
>> things to go back to normal.
>> It would be nice to be able to avoid this.
>>
>> Filipe
>>
>> _______________________________________________
>> Gluster-devel mailing list
>> Gluster-devel@xxxxxxxxxx
>> http://lists.nongnu.org/mailman/listinfo/gluster-devel
>>
>>
>




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux