Home | History | Annotate | Download | only in msdosfs
History log of /src/sys/fs/msdosfs/denode.h
RevisionDateAuthorComments
 1.29  23-Oct-2021  thorpej Sanitize the symbol namespace. NFC.
 1.28  23-Oct-2021  hannken Convert msdosfs_rename() to use genfs_sane_rename().

Based on work by Taylor R Campbell.
 1.27  23-Oct-2021  hannken Factor out the lookup results from struct denode.

No functional change.
 1.26  18-Jul-2021  dholland Abolish all the silly indirection macros for initializing vnode ops tables.

These are things of the form #define foofs_op genfs_op, or #define
foofs_op genfs_eopnotsupp, or similar. They serve no purpose besides
obfuscation, and have gotten cutpasted all over everywhere.
 1.25  14-Jan-2017  maya branches: 1.25.32;
Be explicit about how we're placing part of the on-disk name into
the extension, so it doesn't appear like we are overrunning an array.
Appeases coverity, NFC.

ok riastradh
 1.24  08-Jul-2014  hannken branches: 1.24.4; 1.24.8;
Change msdosfs from hashlist to vcache:
- Use (dir_cluster, dir_offset, dir_generation) as key, where
dir_generation is non-zero and unique for unlinked but open nodes.
- Change deget() to return a vnode as it is unsafe to return a
referenced but unlocked denode.
 1.23  26-Jan-2013  christos branches: 1.23.10;
fix fstat build.
 1.22  26-Jan-2013  christos more cross-compile friendly.
 1.21  26-Jan-2013  christos expose more stuff if MAKEFS is defined for the headers, and arrange for
the source file to be compilable from userland.
 1.20  04-Nov-2012  jakllsch Stylistic changes in comments/strings:
"FAT" and "fat" are different things, use the appropriate case.
"GEMDOS" is all caps.
 1.19  04-Apr-2011  hannken branches: 1.19.4; 1.19.14;
Msdosfs on-disk meta data is not sufficient to create or validate file handles.

Maintain a tree of file handles, create nodes from msdosfs_vptofh() and keep
them until either the file gets unlinked or the file system gets unmounted.

Fixes the msdosfs part of PR #43745 (fhopen of an unlinked file causes problems
on multiple file systems)
 1.18  08-Apr-2010  pooka branches: 1.18.2;
In genfs where available.

The only functional change is mknod now returning EOPNOTSUPP instead
of EINVAL. I make this sacrifice willingly and with a clean conscience.
 1.17  08-Apr-2010  pooka Use genfs instead of homegrown stuff where possible.
 1.16  26-Nov-2007  pooka branches: 1.16.18; 1.16.38; 1.16.40;
Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start. In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
 1.15  09-Apr-2007  pooka branches: 1.15.8; 1.15.10; 1.15.16;
fix comment: struct fid is in fstypes.h now
 1.14  22-Sep-2006  xtraeme branches: 1.14.4; 1.14.8; 1.14.10;
Apply patch from PR kern/34583 sent by Rhialto, quoting him:

"Add a 3rd entry in the cache, which keeps the end position
from just before extending a file.
This has the desired effect of keeping the write speed constant."

And yes, that helps a lot copying large files... always at full speed
now. This closes my PR kern/30868 "Poor performance copying large files
on msdosfs".

Also remove a 2 if-statements testing the same condition, combine them.

All that from Rhialto, thank you very much.
 1.13  14-May-2006  elad branches: 1.13.6; 1.13.8; 1.13.10;
integrate kauth.
 1.12  11-Dec-2005  christos branches: 1.12.4; 1.12.6; 1.12.8; 1.12.10; 1.12.12;
merge ktrace-lwp.
 1.11  03-Dec-2005  christos - protect userland exported files against multiple inclusion.
- make sure that kernel only files don't compile in userland using #error
- XXX: some kernel only files still get installed.
- XXX: some files used in userland, don't get installed.
 1.10  04-Nov-2005  christos PR/32003: Brian Buhrow: msdosfs doesn't properly zero out high cluster data
on non-FAT32 msdos filesystems.
 1.9  02-Nov-2005  yamt merge yamt-vop branch. remove following VOPs.

VOP_BLKATOFF
VOP_VALLOC
VOP_BALLOC
VOP_REALLOCBLKS
VOP_VFREE
VOP_TRUNCATE
VOP_UPDATE
 1.8  12-Sep-2005  christos branches: 1.8.2;
Use nanotime() to update the time fields in filesystems. Convert the code
from macros to real functions. Original patch and review from chuq.
Note: ext2fs only keeps seconds in the on-disk inode, and msdosfs does not
have enough precision for all fields, so this is not very useful for those
two.
 1.7  29-Aug-2005  xtraeme Remove __P()
 1.6  29-Aug-2005  xtraeme The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, so
don't bother trying to write files bigger than this. Just return
EFBIG to caller, rather than panic()ing later.

From OpenBSD.

This closes my PR kern/30864: "panic when copying files of >4GB on msdosfs"
 1.5  23-Jul-2005  yamt update file timestamps for nfsd loaned-read and mmap.
PR/25279. discussed on tech-kern@.
 1.4  07-Sep-2003  itojun branches: 1.4.2; 1.4.6; 1.4.14; 1.4.16;
add -t option for gmt time offset (normally MS-DOS filesystem has timestamp
in localtime, not GMT). PR kern/22717
 1.3  29-Jun-2003  fvdl branches: 1.3.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.2  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.1  26-Dec-2002  jdolecek branches: 1.1.2;
move msdosfs code from sys/msdosfs to sys/fs/msdosfs
 1.1.2.2  29-Dec-2002  thorpej With with HEAD.
 1.1.2.1  26-Dec-2002  thorpej file denode.h was added on branch nathanw_sa on 2002-12-29 19:55:57 +0000
 1.3.2.6  11-Dec-2005  christos Sync with head.
 1.3.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.3.2.2  03-Aug-2004  skrll Sync with HEAD
 1.3.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.4.16.4  07-Dec-2007  yamt sync with head
 1.4.16.3  03-Sep-2007  yamt sync with head.
 1.4.16.2  30-Dec-2006  yamt sync with head.
 1.4.16.1  21-Jun-2006  yamt sync with head.
 1.4.14.4  06-Oct-2006  ghen Pull up following revision(s) (requested by xtraeme in ticket #1525):
sys/fs/msdosfs/denode.h: revision 1.14
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.31
sys/fs/msdosfs/msdosfs_fat.c: revision 1.11
Apply patch from PR kern/34583 sent by Rhialto, quoting him:
"Add a 3rd entry in the cache, which keeps the end position
from just before extending a file.
This has the desired effect of keeping the write speed constant."
And yes, that helps a lot copying large files... always at full speed
now. This closes my PR kern/30868 "Poor performance copying large files
on msdosfs".
Also remove a 2 if-statements testing the same condition, combine them.
All that from Rhialto, thank you very much.
 1.4.14.3  06-Nov-2005  tron Pull up following revision(s) (requested by christos in ticket #937):
sys/fs/msdosfs/denode.h: revision 1.10
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.22
PR/32003: Brian Buhrow: msdosfs doesn't properly zero out high cluster data
on non-FAT32 msdos filesystems.
 1.4.14.2  02-Sep-2005  riz Pull up following revision(s) (requested by xtraeme in ticket #722):
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.17
sys/fs/msdosfs/denode.h: revision 1.6
The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, so
don't bother trying to write files bigger than this. Just return
EFBIG to caller, rather than panic()ing later.
From OpenBSD.
This closes my PR kern/30864: "panic when copying files of >4GB on
msdosfs"
 1.4.14.1  24-Aug-2005  riz Pull up following revision(s) (requested by yamt in ticket #688):
sys/miscfs/genfs/genfs_vnops.c: revision 1.98 via patch
sys/ufs/ffs/ffs_vfsops.c: revision 1.165
sys/ufs/lfs/lfs_extern.h: revision 1.69
sys/fs/filecorefs/filecore_vfsops.c: revision 1.20
sys/nfs/nfs_node.c: revision 1.80
sys/fs/smbfs/smbfs_node.c: revision 1.24
sys/fs/cd9660/cd9660_vfsops.c: revision 1.24
sys/fs/msdosfs/msdosfs_denode.c: revision 1.8
sys/miscfs/genfs/genfs_node.h: revision 1.6
sys/ufs/lfs/lfs_vfsops.c: revision 1.183
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.86
sys/fs/adosfs/advfsops.c: revision 1.23
sys/fs/ntfs/ntfs_vfsops.c: revision 1.31
- constify genfs_ops.
- use member designators.

sys/miscfs/genfs/genfs_vnops.c: revision 1.99 via patch
genfs_getpages: don't forget to put the vnode onto the syncer's work que
ue
even in the case of PGO_LOCKED.

sys/uvm/uvm_bio.c: revision 1.40
sys/uvm/uvm_pager.h: revision 1.29
sys/miscfs/genfs/genfs_vnops.c: revision 1.100 via patch
sys/ufs/ufs/ufs_inode.c: revision 1.50
- introduce PGO_NOBLOCKALLOC and use it for ubc mapping
to prevent unnecessary block allocations in the case that
page size > block size.
- ufs_balloc_range: use VM_PROT_WRITE+PGO_NOBLOCKALLOC rather than
VM_PROT_READ.

sys/uvm/uvm_fault.c: revision 1.96
sys/miscfs/genfs/genfs_vnops.c: revision 1.101 via patch
sys/uvm/uvm_object.h: revision 1.19
sys/miscfs/genfs/genfs_node.h: revision 1.7
ensure that vnodes with dirty pages are always on syncer's queue.
- genfs_putpages: wait for i/o completion of PG_RELEASED/PG_PAGEOUT pages by
setting "wasclean" false when encountering them.
suggested by Stephan Uphoff in PR/24596 (1).
- genfs_putpages: write protect pages when cleaning out, if
we're going to take the vnode off the syncer's queue.
uvm_fault: don't write-map pages unless its vnode is already on
the syncer's queue.
fix PR/24596 (3) but in the different way from the suggested fix.
(to keep our current behaviour, ie. not to require explicit msync.
discussed on tech-kern@.)
- genfs_putpages: don't mistakenly take a vnode off the queue
by introducing a generation number in genfs_node.
genfs_getpages: increment the generation number.
suggested by Stephan Uphoff in PR/24596 (2).
- add some assertions.

sys/miscfs/genfs/genfs_vnops.c: revision 1.102 via patch
genfs_putpages: don't bother to clean the vnode unless VONWORKLST.

sys/ufs/ffs/ffs_vnops.c: revision 1.71
ffs_full_fsync: because VBLK/VCHR can be mmap'ed,
do VOP_PUTPAGES for them as well.

sys/uvm/uvm_fault.c: revision 1.97
uvm_fault: check a correct object in the case of layered filesystems.
fix PR/30811 from Jukka Salmi.

sys/uvm/uvm_object.h: revision 1.20
sys/ufs/ffs/ffs_vfsops.c: revision 1.167
sys/uvm/uvm_bio.c: revision 1.41
sys/ufs/ufs/ufs_vnops.c: revision 1.129
sys/uvm/uvm_mmap.c: revision 1.92
sys/uvm/uvm_fault.c: revision 1.98
sys/kern/vfs_subr.c: revision 1.252
sys/fs/msdosfs/denode.h: revision 1.5
sys/miscfs/genfs/genfs_vnops.c: revision 1.103 via patch
sys/fs/msdosfs/msdosfs_denode.c: revision 1.9
sys/sys/vnode.h: revision 1.141
sys/ufs/ufs/ufs_inode.c: revision 1.51
sys/ufs/ufs/ufs_extern.h: revision 1.45 via patch
sys/miscfs/genfs/genfs_node.h: revision 1.8
sys/ufs/lfs/lfs_vfsops.c: revision 1.184
sys/uvm/uvm_pager.h: revision 1.30
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.87
update file timestamps for nfsd loaned-read and mmap.
PR/25279. discussed on tech-kern@.

sys/miscfs/genfs/genfs_vnops.c: revision 1.104 via patch
don't write-protect wired pages. pointed by Chuck Silvers.
for now, leave a vnode on the syncer's queue, as suggested by him.

sys/ufs/ffs/ffs_vnops.c: revision 1.72
revert VCHR part of ffs_vnops.c 1.71.
as VCHR uses the device pager, no point to call VOP_PUTPAGES here.
pointed by Chuck Silvers.
 1.4.6.2  06-Nov-2005  riz Pull up following revision(s) (requested by christos in ticket #5972):
sys/fs/msdosfs/denode.h: revision 1.10
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.22
PR/32003: Brian Buhrow: msdosfs doesn't properly zero out high cluster data
on non-FAT32 msdos filesystems.
 1.4.6.1  06-Sep-2005  riz Pull up following revision(s) (requested by xtraeme in ticket #5627):
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.17
sys/fs/msdosfs/denode.h: revision 1.6
The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, so
don't bother trying to write files bigger than this. Just return
EFBIG to caller, rather than panic()ing later.
From OpenBSD.
This closes my PR kern/30864: "panic when copying files of >4GB on
msdosfs"
 1.4.2.1  06-Sep-2005  riz Pull up following revision(s) (requested by xtraeme in ticket #5627):
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.17
sys/fs/msdosfs/denode.h: revision 1.6
The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, so
don't bother trying to write files bigger than this. Just return
EFBIG to caller, rather than panic()ing later.
From OpenBSD.
This closes my PR kern/30864: "panic when copying files of >4GB on
msdosfs"
 1.8.2.1  20-Oct-2005  yamt adapt msdosfs.
 1.12.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.12.10.1  08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.12.8.1  24-May-2006  yamt sync with head.
 1.12.6.1  01-Jun-2006  kardel Sync with head.
 1.12.4.1  09-Sep-2006  rpaulo sync with head
 1.13.10.1  22-Oct-2006  yamt sync with head
 1.13.8.1  18-Nov-2006  ad Sync with head.
 1.13.6.1  23-Sep-2006  ghen Pull up following revision(s) (requested by xtraeme in ticket #206):
sys/fs/msdosfs/denode.h: revision 1.14
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.31
sys/fs/msdosfs/msdosfs_fat.c: revision 1.11
Apply patch from PR kern/34583 sent by Rhialto, quoting him:
"Add a 3rd entry in the cache, which keeps the end position
from just before extending a file.
This has the desired effect of keeping the write speed constant."
And yes, that helps a lot copying large files... always at full speed
now. This closes my PR kern/30868 "Poor performance copying large files
on msdosfs".
Also remove a 2 if-statements testing the same condition, combine them.
All that from Rhialto, thank you very much.
 1.14.10.1  11-Jul-2007  mjf Sync with head.
 1.14.8.1  10-Apr-2007  ad Sync with head.
 1.14.4.1  15-Apr-2007  yamt sync with head.
 1.15.16.1  08-Dec-2007  mjf Sync with HEAD.
 1.15.10.1  09-Jan-2008  matt sync with HEAD
 1.15.8.1  27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.16.40.2  21-Apr-2011  rmind sync with head
 1.16.40.1  30-May-2010  rmind sync with head
 1.16.38.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.16.18.1  11-Aug-2010  yamt sync with head.
 1.18.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.19.14.4  03-Dec-2017  jdolecek update from HEAD
 1.19.14.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.14.2  25-Feb-2013  tls resync with head
 1.19.14.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.4.2  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.19.4.1  16-Jan-2013  yamt sync with (a bit old) head
 1.23.10.1  10-Aug-2014  tls Rebase.
 1.24.8.1  20-Mar-2017  pgoyette Sync with HEAD
 1.24.4.1  05-Feb-2017  skrll Sync with HEAD
 1.25.32.1  01-Aug-2021  thorpej Sync with HEAD.

RSS XML Feed