Home | History | Annotate | Download | only in lfs
History log of /src/sys/ufs/lfs/lfs_itimes.c
RevisionDateAuthorComments
 1.20  10-Jun-2017  maya Rename i_flag to i_state.

The similarity to i_flags has previously caused errors.
 1.19  01-Sep-2015  dholland branches: 1.19.10;
Use the lfs dinode accessors in place of the ufs-derived ones.
(Mostly.)

The ufs-derived ones are fake structure member macros, which are gross
and not very safe. Also, it seems that a lot of places in the lfs code
were using the ffsv1 branch of them unconditionally, and this way it's
guaranteed all those places have been updated.

Found while doing this: for non-devices, have getattr produce NODEV
in the rdev field instead of leaking the address of the first direct
block.
 1.18  12-Aug-2015  dholland Add IFILE32 and IFILE64 structures for the on-disk ifile entries.
Add and use accessors. There are also a bunch of places that cast and
I hope I've found them all...
 1.17  02-Aug-2015  dholland Use accessor functions for the version field of the lfs superblock.
I thought at first maybe the cases that test the version should be
rolled into the accessors, but on the whole I think the conclusion on
that is no.
 1.16  28-Jul-2015  dholland Add a new lfs header file: lfs_accessors.h.

This contains all the accessor functions and macros out of lfs.h.
Add an include of lfs_accessors.h after all uses of lfs.h... except
for code that wants to define its own struct lfs-alike that the
accessors are supposed to play along with. For these, set STRUCT_LFS
and include lfs_accessors.h after the necessary structure has been
defined, so that lfs_accessors.h can emit functions in terms of it.
 1.15  08-Jun-2013  dholland branches: 1.15.10;
Tidy up the LFS userland build hacks.
Don't use -I${NETBSDSRCDIR}/sys; don't include files other than the
exported LFS headers, which are lfs.h, lfs_inode.h, and (for now)
lfs_extern.h.
 1.14  06-Jun-2013  dholland Cleanups and hacks to make lfs userland stuff build:
- lfs_cksum.c doesn't actually need ulfs_inode.h any more.
- neither does lfs_itimes.c.
- add hacks to fsck_lfs to make it compile.
- add hacks to newfs_lfs to make it compile.
- fix warning in ulfs_quota.c when quotas are fully disabled
(as I guess is happening with the rumpity version)

XXX: This commit adds -I${NETBSDSRCDIR}/sys to the Makefiles for
XXX: fsck_lfs, newfs_lfs, and lfs_cleanerd. This needs to be cleaned
XXX: up ASAP; but I consider this less problematic in the short term
XXX: than spewing ulfs_*.h into /usr/include.
 1.13  06-Jun-2013  dholland Split lfs from ufs, part 2:

Change all <ufs/ufs/foo.h> includes to <ufs/lfs/ulfs_foo.h>.
 1.12  28-Apr-2008  martin branches: 1.12.34; 1.12.44;
Remove clause 3 and 4 from TNF licenses
 1.11  02-Jan-2008  ad branches: 1.11.6; 1.11.8; 1.11.10;
Merge vmlocking2 to head.
 1.10  23-Jun-2006  yamt branches: 1.10.14; 1.10.30; 1.10.36; 1.10.40; 1.10.44;
fix a simonb-timecounters regression.
the precision of getnanotime() is not suitable for file timestamps.
esp. when it's nfs-exported.

- introduce vfs_timestamp().
(the name is from freebsd. currently merely a wrapper of nanotime())
- for ufs-like filesystems, use it rather than getnanotime().

XXX check other filesystems.
 1.9  07-Jun-2006  kardel branches: 1.9.2; 1.9.4;
merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
time.tv_sec -> time_second
- struct timeval mono_time is gone
mono_time.tv_sec -> time_uptime
- access to time via
{get,}{micro,nano,bin}time()
get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
 1.8  15-May-2006  christos branches: 1.8.2;
we need <sys/kauth.h> for the kernel.
 1.7  15-May-2006  christos Don't include <sys/kauth.h>; breaks userland (newfs_lfs)
 1.6  14-May-2006  elad integrate kauth.
 1.5  19-Mar-2006  rtr don't bother checking of ts == NULL before assigning since we know that
it is.
solves coverity 2725 / run 6
 1.4  11-Dec-2005  christos branches: 1.4.4; 1.4.6; 1.4.8; 1.4.10; 1.4.12;
merge ktrace-lwp.
 1.3  30-Oct-2005  simonb branches: 1.3.2;
We don't need <sys/systm.h> here.
 1.2  13-Sep-2005  christos branches: 1.2.2;
redefine panic if we are a user program.
 1.1  13-Sep-2005  christos split out lfs_itimes(). It is used in fsck_lfs.
 1.2.2.1  02-Nov-2005  yamt sync with head.
 1.3.2.2  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.1  30-Oct-2005  skrll file lfs_itimes.c was added on branch ktrace-lwp on 2005-11-10 14:12:32 +0000
 1.4.12.2  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.4.12.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.4.10.2  06-May-2006  christos - Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
that need it.

Approved by core.
 1.4.10.1  19-Apr-2006  elad sync with head.
 1.4.8.3  26-Jun-2006  yamt sync with head.
 1.4.8.2  24-May-2006  yamt sync with head.
 1.4.8.1  01-Apr-2006  yamt sync with head.
 1.4.6.4  01-Jun-2006  kardel Sync with head.
 1.4.6.3  22-Apr-2006  simonb Sync with head.
 1.4.6.2  05-Feb-2006  simonb In the *itimes functions, just call getnanotime() at the start of
the function and use the result if needed, rather than the previous
conditional calls/assignments method. The code is clearer this way,
and benchmarks at about the same speed.
 1.4.6.1  04-Feb-2006  simonb Adapt for timecounters: mostly use get*time() and use "time_second"
instead of "time.tv_sec".
 1.4.4.1  09-Sep-2006  rpaulo sync with head
 1.8.2.1  19-Jun-2006  chap Sync with head.
 1.9.4.4  21-Jan-2008  yamt sync with head
 1.9.4.3  30-Dec-2006  yamt sync with head.
 1.9.4.2  21-Jun-2006  yamt sync with head.
 1.9.4.1  07-Jun-2006  yamt file lfs_itimes.c was added on branch yamt-lazymbuf on 2006-06-21 15:12:39 +0000
 1.9.2.1  13-Jul-2006  gdamore Merge from HEAD.
 1.10.44.1  02-Jan-2008  bouyer Sync with HEAD
 1.10.40.2  19-Dec-2007  ad Use a global lfs_lock.
 1.10.40.1  04-Dec-2007  ad Pull the vmlocking changes into a new branch.
 1.10.36.1  18-Feb-2008  mjf Sync with HEAD.
 1.10.30.1  09-Jan-2008  matt sync with HEAD
 1.10.14.1  13-Mar-2007  ad Pull in the initial set of changes for the vmlocking branch.
 1.11.10.1  16-May-2008  yamt sync with head.
 1.11.8.1  18-May-2008  yamt sync with head.
 1.11.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.12.44.2  03-Dec-2017  jdolecek update from HEAD
 1.12.44.1  23-Jun-2013  tls resync from head
 1.12.34.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.10.2  28-Aug-2017  skrll Sync with HEAD
 1.15.10.1  22-Sep-2015  skrll Sync with HEAD
 1.19.10.1  30-Oct-2017  snj Pull up following revision(s) (requested by maya in ticket #330):
sbin/fsck_lfs/inode.c: 1.69
sbin/fsck_lfs/lfs.c: 1.73
sbin/fsck_lfs/pass6.c: 1.50
sbin/fsck_lfs/segwrite.c: 1.46
sys/ufs/lfs/lfs.h: 1.202-1.203
sys/ufs/lfs/lfs_accessors.h: 1.48
sys/ufs/lfs/lfs_alloc.c: 1.136-1.137
sys/ufs/lfs/lfs_balloc.c: 1.94
sys/ufs/lfs/lfs_bio.c: 1.141
sys/ufs/lfs/lfs_extern.h: 1.113
sys/ufs/lfs/lfs_inode.c: 1.156-1.157
sys/ufs/lfs/lfs_inode.h: 1.20, 1.21, 1.23
sys/ufs/lfs/lfs_itimes.c: 1.20
sys/ufs/lfs/lfs_pages.c: 1.13-1.15
sys/ufs/lfs/lfs_rename.c: 1.22
sys/ufs/lfs/lfs_segment.c: 1.270-1.275
sys/ufs/lfs/lfs_subr.c: 1.94-1.97
sys/ufs/lfs/lfs_syscalls.c: 1.175
sys/ufs/lfs/lfs_vfsops.c: 1.360
sys/ufs/lfs/lfs_vnops.c: 1.316-1.321
sys/ufs/lfs/ulfs_inode.c: 1.20
sys/ufs/lfs/ulfs_inode.h: 1.24
sys/ufs/lfs/ulfs_lookup.c: 1.41
sys/ufs/lfs/ulfs_quota2.c: 1.31
sys/ufs/lfs/ulfs_readwrite.c: 1.24
sys/ufs/lfs/ulfs_vnops.c: 1.49-1.50
Update inode member i_flag --> i_state to keep up with kernel changes
Move definition of IN_ALLMOD near the flag it's a mask for.
Now we can see that it doesn't match all the flags, but changing that will
require more careful thought.
Correct confusion between i_flag and i_flags
These will have to be renamed.
Spotted by Riastradh, thanks!
Add an XXX about the missing flags so it's not buried in a commit
message.
now the XXX count for LFS is 260
Rename i_flag to i_state.
The similarity to i_flags has previously caused errors.
Use continue to denote the no-op loop to match netbsd style
newline for extra clarity.
It isn't safe to drain dirops with seglock held, it'll deadlock if there
are any dirops. drain before grabbing seglock.
lfs_dirops == 0 is always true (as we already drained dirops), so omit
that part of the comparison.
Fixes a lot of LFS deadlocks. PR kern/52301
Many thanks to dholland for help analyzing coredumps
Ifdef out KDASSERT which fires on my machine.
Deduplicate sanity check that seglock is held on segunlock
Revert r1.272 fix to PR kern/52301, the performance hit is making things
unusable.
change lfs_nextsegsleep and lfs_allclean_wakeup to use condvar
XXX had to use lfs_lock in lfs_segwait, removed kernel_lock, is this
appropriate?
fix buffer overflow/KASSERT when cookies are supplied
lfs no longer uses the ffs-style struct direct, use the correct minimum
size
from dholland
XXX more wrong
Consistently use {,UN}MARK_VNODE macros rather than function calls.
Not much point doing anything after a panic call
Ask some question about the code in a XXX comment
XXX question our double-flushing of dirops
Fix typo in comment

RSS XML Feed