proper file attribute (a.k.a. "resource fork") is picked up when
the filehandle is mapped back to filesystem object.
This should make attributes working on NFS-exported NTFS filesystems
or other layered filesystems using filehandles.
lock counts consistent. DIAGNOSTIC checks will barf otherwise.
XXX ntfs_ntput should not free the node, the reclaim vop should do it
XXX why does the ntfs code do its own internal locking?
also fixes bug introduced in previous commit - the check for VBAD device node
added in rev 1.20 was accidentaly run AFTER v_specinfo was touched,
making the check useless
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.
Bump version number to 1.4O
ntnode->ntmp->ntm_* values
ntfs_inactivate(): as NTFS doesn't support any filesystem changes,
it's not needed to check whether the file handle is stale;
the check was bogus anyway - besides the value of vp->v_usecount
was checked with unlocked vnode, the vnode was unnecessarily
_always_ recycled when the filesystem containing it has been
mounted with mask (-i parameter to mount_ntfs(1))
not specified or 0 -- unbelievable, but true
ntfs_reclaim(): don't call VOP_UNLOCK() even on FreeBSD - it's not
done for any other their filesystem, so it should not be done even
for NTFS
ntfs_access(): remove the commented-out check for immutable flag, it doesn't
make sense for NTFS
other miscelaneous cosmetic cleanups
VOP__UNLOCK() macros, g/c VOP__LOCK()
add some comments
use LK_RETRY flag as appropriate
g/c the FreeBSD vnode_pager_uncache() staff, as was done in FreeBSD tree a while
ago (actually, when they merged the first round of NetBSD patches)
use VN_LOCK() & VOP__UNLOCK() consistently throughout the code instead
of vn_lock() and VOP_UNLOCK()
minor whitespace changes
not set, unlock the vnode before calling the device's close routine and
relock it after it returns. tty close routines will sleep waiting for
buffers to drain, which won't happen often times as the other side needs
to grab the vnode lock first.
Make all unmount routines lock the device vnode before calling VOP_CLOSE().
make ntfs_ntref() real function and properly lock ip->i_interlock when
updating ip->i_usecount
g/c ntfs_uustricmp()
make ntfs_uastr[i]cmp() static, rename arguments to be a bit more mnemonic
add couple of casts to NTFS_TOUPPER() and ntfs_uastr[i]cmp() - this
corrects couple of cases when open()/stat() failed for
files which apparently existed and even showed in ls output
ntfs_ntlookup(): initialize ip properly if ntnode is found in hash table,
so that debug prints doesn't print garbage in that case
some whitespace policy
shared by several fnodes when the file is simultaneonsly opened by
several callers and different "attributes" (a.k.a. resource forks)
are requested. They have been converted to use lockmgr()-style locking.
guard the setting and checking of i_usecount by simplelock; as
situation where there would be several users of same ntnode is
extremery rare, it's not worth the efford to change the code to
hold the (exclusive) lock only when it's needed
* in struct fnode, g/c f_dev & f_type (former is already in ntnode,
latter is in parent vnode), move f_devvp from struct fnode into
struct ntnode (no reason this should be copied in each fnode)
* f_lock is only needed for FreeBSD (for their totally disgusting
and insane way of doing generic vnode locking)
* g/c f_mp, it was write-only
* some comments added
ntfs_findvattr(), AALPCMP --> NTFS_AALPCMP, avoid excessive
intendation, fix debug printf when the attribute is not found
to print only first namelen characters of name
some minor KNF and const poisoning
ntfs_ntlookupattr(): make it static, collapse duplicated code
ntfs_ntlookupfile(): avoid memory leak, explicitly set error to 0 when
returning success
kill some bogus comments
changes: cache_lookup() now returns -1 if not successful; for
the '.' case, 'error' haven't been cleared to 0,
so that ntfs_lookup() itself returned -1 , resulting to
nasty "leaf should be empty" panic early after
routines - avoids potential DoS attack and closes an easy way to force
the kernel to panic
* for read(), DTRT WRT offset bigger than file size
ntfs_strategy(): adapt to ntfs_readattr() change
ntfs_readdir(): use ntfs_u28() to translate the file name characters
to 8bit encoding, avoid excessive intendation, reformat the
debug messages slightly