lkml.org 
[lkml]   [2008]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files
From
Date
> Reminds me, I've got a patch here for addressing that problem with loop mounts:
>
> Writes to loop should update the mtime of the underlying file.
>
> Signed-off-by: Matt Mackall <mpm@selenic.com>
>
> Index: l/drivers/block/loop.c
> ===================================================================
> --- l.orig/drivers/block/loop.c 2007-11-05 17:50:07.000000000 -0600
> +++ l/drivers/block/loop.c 2007-11-05 19:03:51.000000000 -0600
> @@ -221,6 +221,7 @@ static int do_lo_send_aops(struct loop_d
> offset = pos & ((pgoff_t)PAGE_CACHE_SIZE - 1);
> bv_offs = bvec->bv_offset;
> len = bvec->bv_len;
> + file_update_time(file);
> while (len > 0) {
> sector_t IV;
> unsigned size;
> @@ -299,6 +300,7 @@ static int __do_lo_send_write(struct fil
>
> set_fs(get_ds());
> bw = file->f_op->write(file, buf, len, &pos);
> + file_update_time(file);

->write should have already updated the times, no?

> set_fs(old_fs);
> if (likely(bw == len))
> return 0;
>
>


\
 
 \ /
  Last update: 2008-01-19 11:25    [W:0.128 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site