DragonFly BSD
DragonFly bugs List (threaded) for 2005-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

patch not updating atime


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Tue, 12 Jul 2005 00:12:10 +0200

hey,

I just ran into an atime update issue:

printf "1\n\2\n\3\n" > data
printf "1\n\4\n\3\n" > data2
diff -u data data2 > data.diff
sleep 60      # wait some time
patch -o data.out -i data.diff data
ls -lu data data2 data.diff data.out

-rw-r--r--  1 corecode  corecode    6 Jul 12 00:08 data
-rw-r--r--  1 corecode  corecode  119 Jul 12 00:09 data.diff
-rw-r--r--  1 corecode  corecode    6 Jul 12 00:09 data.out
-rw-r--r--  1 corecode  corecode    6 Jul 12 00:08 data2

note that data, which actually was used as input source, doesn't
have a changed atime.

I guess this is because patch(1) does an open(2)+mmap(2), but
never an actual read. Shouldn't we at least set the atime on
open(2) [don't know if it's feasible for mmap/faulting in the
pages]?

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Attachment: pgp00004.pgp
Description: PGP signature



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