History log of /src/sys/ufs/ufs/ufs_rename.c |
Revision | | Date | Author | Comments |
1.14 |
| 20-Oct-2021 |
thorpej | Overhaul of the EVFILT_VNODE kevent(2) filter:
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than forcing each individual file system to deal with it (except VOP_RENAME(), because VOP_RENAME() is a mess and we currently have 2 different ways of handling it; at least it's reasonably well-centralized in the "new" way). - Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ, compatible with the same events in FreeBSD. - Track which kevent notifications clients are interested in receiving to avoid doing work for events no one cares about (avoiding, e.g. taking locks and traversing the klist to send a NOTE_WRITE when someone is merely watching for a file to be deleted, for example).
In support of the above:
- Add support in vnode_if.sh for specifying PRE- and POST-op handlers, to be invoked before and after vop_pre() and vop_post(), respectively. Basic idea from FreeBSD, but implemented differently. - Add support in vnode_if.sh for specifying CONTEXT fields in the vop_*_args structures. These context fields are used to convey information between the file system VOP function and the VOP wrapper, but do not occupy an argument slot in the VOP_*() call itself. These context fields are initialized and subsequently interpreted by PRE- and POST-op handlers. - Version VOP_REMOVE(), uses the a context field for the file system to report back the resulting link count of the target vnode. Return this in tmpfs, udf, nfs, chfs, ext2fs, lfs, and ufs.
NetBSD 9.99.92.
|
1.13 |
| 28-Oct-2016 |
jdolecek | reorganize ffs_truncate()/ffs_indirtrunc() to be able to partially succeed; change wapbl_register_deallocation() to return EAGAIN rather than panic when code hits the limit
callers changed to either loop calling ffs_truncate() using new utility ufs_truncate_retry() if their semantics requires it, or just ignore the failure; remove ufs_wapbl_truncate()
this fixes possible user-triggerable panic during truncate, and resolves WAPBL performance issue with truncates of large files
PR kern/47146 and kern/49175
|
1.12 |
| 27-Mar-2015 |
riastradh | branches: 1.12.2; Disentangle buffer-cached I/O from page-cached I/O in UFS.
Page-cached I/O is used for regular files, and is initiated by VFS users such as userland and NFS.
Buffer-cached I/O is used for directories and symlinks, and is issued only internally by UFS.
New UFS routine ufs_bufio replaces vn_rdwr for internal use. ufs_bufio is implemented by new UFS operations uo_bufrd/uo_bufwr, which sit in ufs_readwrite.c alongside the VOP_READ/VOP_WRITE implementations.
I preserved the code as much as possible and will leave further simplification for future commits. I kept the ulfs_readwrite.c copypasta close to ufs_readwrite.c in case we ever want to merge them back; likewise ext2fs_readwrite.c.
No externally visible semantic change. All atf fs tests still pass.
|
1.11 |
| 25-May-2014 |
hannken | branches: 1.11.4; ufs_gro_genealogy: use vcache_get() to lookup DOTDOT.
|
1.10 |
| 06-Feb-2014 |
hannken | branches: 1.10.2; Move fstrans_start()/fstrans_done() into genfs_insane_rename() to protect the complete rename operation like we do for all other vnode operations.
|
1.9 |
| 04-Nov-2013 |
christos | Add 2 XXX: gcc initializations
|
1.8 |
| 19-Jun-2013 |
dholland | branches: 1.8.2; Rename ambiguous macros: MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR INOPB -> FFS_INOPB, LFS_INOPB INOPF -> FFS_INOPF, LFS_INOPF blksize -> ffs_blksize, ext2_blksize, or lfs_blksize sblksize -> ffs_blksize
These are not the only ambiguously defined filesystem macros, of course, there's a pile more. I may not have found all the ambiguous definitions of blksize(), too, as there are a lot of other things called 'blksize' in the system.
|
1.7 |
| 09-Jun-2013 |
dholland | Stick UFS_ in front of these symbols: DIRBLKSIZ DIRECTSIZ DIRSIZ OLDDIRFMT NEWDIRFMT
Part of PR 47909.
|
1.6 |
| 22-Jan-2013 |
dholland | Stuff UFS_ in front of a few of ufs's symbols to reduce namespace pollution. Specifically: ROOTINO -> UFS_ROOTINO WINO -> UFS_WINO NXADDR -> UFS_NXADDR NDADDR -> UFS_NDADDR NIADDR -> UFS_NIADDR MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)
Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have the same values in ext2fs and ffs.
No functional change intended.
|
1.5 |
| 04-Jun-2012 |
riastradh | branches: 1.5.2; Kill the IN_RENAME in-core inode flag in ufs and ext2fs.
Now that rename works we need not to wave this sort of voodoo at it.
ok dholland
|
1.4 |
| 04-Jun-2012 |
riastradh | Fix typo in comment: bp->b_bcount, not bp->b_count.
|
1.3 |
| 04-Jun-2012 |
riastradh | Kill scary message about cross-block directories and fix its cause.
Add a bunch of kasserts to check more stringently that ufs_direnter did not compact across directory blocks. Don't bother fetching subsequent I/O blocks from the directory: ufs_lookup guarantees that it's not necessary, and the kasserts check this to be sure.
The message fired when we were looking at the start of an I/O block, not when we crossed from the end of one to the start of another. I believe it fired only when tulr->ulr_offset was a multiple of the I/O block size (fs_bsize), which can happen if ufs_lookup either finds an entry or finds free space at the start of an I/O block.
If ufs_lookup found an entry, none of this ulr recalculation logic should kick in -- if tvp != NULL, then tulr->ulr_count is garbage, so it's not merely unnecessary but wrong (although I suspect harmless in the end) to read it in ufs_rename_overlap_p in consideration of whether to recalculate fulr.
Discussed with chuq and dholland.
ok dholland
|
1.2 |
| 10-May-2012 |
riastradh | branches: 1.2.2; 1.2.4; Disable scary but probably harmless printf.
Still need to find why this harmless-but-shouldn't-happen case is happening, but in the mean time, we can stop scaring people with it.
|
1.1 |
| 09-May-2012 |
riastradh | Adapt ffs, lfs, and ext2fs to use genfs_rename.
ok dholland, rmind
|
1.2.4.2 |
| 02-Jun-2012 |
mrg | sync to latest -current.
|
1.2.4.1 |
| 10-May-2012 |
mrg | file ufs_rename.c was added on branch jmcneill-usbmp on 2012-06-02 11:09:41 +0000
|
1.2.2.5 |
| 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.2.2.4 |
| 23-Jan-2013 |
yamt | sync with head
|
1.2.2.3 |
| 30-Oct-2012 |
yamt | sync with head
|
1.2.2.2 |
| 23-May-2012 |
yamt | sync with head.
|
1.2.2.1 |
| 10-May-2012 |
yamt | file ufs_rename.c was added on branch yamt-pagecache on 2012-05-23 10:08:20 +0000
|
1.5.2.4 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.5.2.3 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.5.2.2 |
| 23-Jun-2013 |
tls | resync from head
|
1.5.2.1 |
| 25-Feb-2013 |
tls | resync with head
|
1.8.2.1 |
| 18-May-2014 |
rmind | sync with head
|
1.10.2.1 |
| 10-Aug-2014 |
tls | Rebase.
|
1.11.4.2 |
| 05-Dec-2016 |
skrll | Sync with HEAD
|
1.11.4.1 |
| 06-Apr-2015 |
skrll | Sync with HEAD
|
1.12.2.1 |
| 04-Nov-2016 |
pgoyette | Sync with HEAD
|