summaryrefslogtreecommitdiffstats
path: root/sys/fs/ntfs
Commit message (Collapse)AuthorAgeFilesLines
* Remove calls to vfs_export() for exporting a filesystem for NFS mountingrodrigc2006-05-261-13/+6
| | | | | from individual filesystems. Call it instead in vfs_mount.c, after we call VFS_MOUNT() for a specific filesystem.
* I ran into an nfs client panic a couple of times in a row over thealfred2006-01-171-1/+5
| | | | | | | | | | | | | | | | | | | | last few days. I tracked it down to the fact that nfs_reclaim() is setting vp->v_data to NULL _before_ calling vnode_destroy_object(). After silence from the mailing list I checked further and discovered that ufs_reclaim() is unique among FreeBSD filesystems for calling vnode_destroy_object() early, long before tossing v_data or much of anything else, for that matter. The rest, including NFS, appear to be identical, as if they were just clones of one original routine. The enclosed patch fixes all file systems in essentially the same way, by moving the call to vnode_destroy_object() to early in the routine (before the call to vfs_hash_remove(), if any). I have only tested NFS, but I've now run for over eighteen hours with the patch where I wouldn't get past four or five without it. Submitted by: Frank Mayhar Requested by: Mohan Srinivasan MFC After: 1 week
* o Typo in the debug message: s/skiped/skipped.maxim2006-01-051-1/+1
| | | | | PR: kern/91346 Submitted by: Gavin Atkinson
* Fix -Wundef.ru2005-12-042-4/+4
|
* Normalize a significant number of kernel malloc type names:rwatson2005-10-313-9/+9
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Cast bf_sysid to const char * when passing it to strncmp(), becauserodrigc2005-09-111-1/+1
| | | | strncmp does not take an unsigned char *. Eliminates warning with GCC 4.0.
* Do not declare M_NTFSMNT with extern linkage here, sincerodrigc2005-09-111-1/+0
| | | | | it is defined with static linkage in ntfs_vfsops.c. Fixes compilation with GCC 4.0.
* Unbreak hpfs/ntfs/udf/ext2fs/reiserfs mounting.ssouhlal2005-09-031-1/+0
| | | | Another pointyhat to: ssouhlal
* *_mountfs() (if the filesystem mounts from a device) needs devvp to bessouhlal2005-09-021-12/+11
| | | | | | | locked, so lock it. Glanced at by: phk MFC after: 3 days
* The printf(9) `%p' conversion specifier puts an "0x" inrobert2005-05-061-2/+2
| | | | | front of the pointer value. Therefore, remove the "0x" from the format string.
* Fix our NTFS readdir function.robert2005-05-061-3/+3
| | | | | | | | | | | | | | | | | | | | | To check a directory's in-use bitmap bit by bit, we use a pointer to an 8 bit wide unsigned value. The index used to dereference this pointer is calculated by shifting the bit index right 3 bits. Then we do a logical AND with the bit# represented by the lower 3 bits of the bit index. This is an idiomatic way of iterating through a bit map with simple bitwise operations. This commit fixes the bug that we only checked bits 3:0 of each 8 bit chunk, because we only used bits 1:0 of the bit index for the bit# in the current 8 bit value. This resulted in files not being returned by getdirentries(2). Change the type of the bit map pointer from `char *' to `u_int8_t *'.
* - Correct the dprintf format int the _lookup routine.jeff2005-03-281-1/+1
| | | | Spotted by: pjd
* - Garbage collect an unused variable.jeff2005-03-281-4/+1
|
* - We no longer have to bother with PDIRUNLOCK, lookup() handles it for us.jeff2005-03-281-19/+3
| | | | Sponsored by: Isilon Systems, Inc.
* - Update vfs_root implementations to match the new prototype. None ofjeff2005-03-241-0/+1
| | | | | | | | these filesystems will support shared locks until they are explicitly modified to do so. Careful review must be done to ensure that this is safe for each individual filesystem. Sponsored by: Isilon Systems, Inc.
* - The VI_DOOMED flag now signals the end of a vnode's relationship withjeff2005-03-131-2/+0
| | | | | | | | the filesystem. Check that rather than VI_XLOCK. - VOP_INACTIVE should no longer drop the vnode lock. - The vnode lock is required around calls to vrecycle() and vgone(). Sponsored by: Isilon Systems, Inc.
* make M_NTFSMNT and ntfs_calccfree() staticphk2005-02-102-3/+3
|
* Make filesystems get rid of their own vnodes vnode_pager object inphk2005-01-281-0/+1
| | | | VOP_RECLAIM().
* Make NTFS at least minimally usable after bufobj and GEOM fallout.peadar2005-01-273-5/+35
| | | | | | | | | | | | | | | | | mmap() on NTFS files was hosed, returning pages offset from the start of the disk rather than the start of the file. (ie, "cp" of a 1-block file would get you a copy of the boot sector, not the data in the file.) The solution isn't ideal, but gives a functioning filesystem. Cached vnode lookup was also broken, resulting in vnode haemorrhage. A lookup on the same file twice would give you two vnodes, and the resulting cached pages. Just recently, mmap() was broken due to a lack of a call to vnode_create_vobject() in ntfs_open(). Discussed with: phk@
* Introduce and use g_vfs_close().phk2005-01-251-2/+2
|
* Create a vp->v_object in VFS_FHTOVP() if we want to be exportablephk2005-01-241-1/+1
| | | | | | | | | | | | | with NFS. We are moving responsibility for creating the vnode_pager object into the filesystems which own the vnode, and this is one of the places we have to cover. We call vnode_create_vobject() directly because we own the vnode. If we can get the size easily, pass it as an argument to save the call to VOP_GETATTR() in vnode_create_vobject()
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()phk2005-01-141-1/+1
|
* Whitespace in vop_vector{} initializations.phk2005-01-131-21/+17
|
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-062-2/+2
|
* Exporting of NTFS filesystem broke in rev 1.70. Fix it.ssouhlal2004-12-131-7/+4
| | | | Approved by: phk, grehan (mentor)
* Don't deref NULL if no charset-conversion is specified.phk2004-12-122-2/+10
| | | | Return correct vnode in vop_bmap()
* Convert to nmount. Add omount compat.phk2004-12-062-61/+80
| | | | | | Same comment about charset conversions apply. Use vfs_mountedfrom(). Rely on vfs_mount.c calling VFS_STATFS().
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-6/+0
| | | | | | | | doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument isn't that. Fix this the cleaner way: Always call the implementation on mnt_stat and copy that in toto to the VFS_STATFS argument if different.
* Remove embryonic rootfs mounting facility.phk2004-12-041-30/+1
| | | | | In the near future rootfs mounting will not require special handling in the filesystems.
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-013-42/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts)
* Mechanically change prototypes for vnode operations to use the new typedefs.phk2004-12-011-13/+13
|
* Make VOP_BMAP return a struct bufobj for the underlying storage devicephk2004-11-151-3/+3
| | | | | | | | | instead of a vnode for it. The vnode_pager does not and should not have any interest in what the filesystem uses for backend. (vfs_cluster doesn't use the backing store argument.)
* Remove stale comment after previous commit.trhodes2004-11-091-3/+0
| | | | Noticed by: pjd
* Detect root mount attempts on the flag, not on the NULL path.phk2004-11-091-1/+1
|
* s/ffs/ntfs/phk2004-11-041-2/+6
| | | | | | Fix error handling to not use VOP_CLOSE() on the disk. Spotted by: tegge
* Make a more whole-hearted attempt at GEOM'ifying NTFS.phk2004-11-033-9/+21
| | | | | | I must have been sleepy when I did the first pass. Spotted by: tegge
* Move NTFS to GEOM backing instead of DEVFS.phk2004-10-291-30/+1
| | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
* Eliminate unnecessary KASSERTs.phk2004-10-271-3/+1
| | | | Don't use bp->b_vp in VOP_STRATEGY: the vnode is passed in as an argument.
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-8/+9
| | | | | | | | | | | | | | | | | | and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch. s/vfs_mount/vfs_omount/ s/vfs_nmount/vfs_mount/ Name our filesystems mount function consistently. Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused. Reorganize the root filesystem selection code.
* Remove global variable rootdevs and rootvp, they are unused as such.phk2004-07-281-2/+2
| | | | | | | | Add local rootvp variables as needed. Remove checks for miniroot's in the swappartition. We never did that and most of the filesystems could never be used for that, but it had still been copy&pasted all over the place.
* Avoid casts as lvalues.kan2004-07-281-1/+1
|
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-121-4/+5
| | | | | | This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the passed thread.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-165-6/+6
| | | | Bump __FreeBSD_version accordingly.
* Remove advertising clause from University of California Regent'simp2004-04-072-8/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Avoid sign extension when casting signed characters to unsigned widetjr2003-12-161-2/+2
| | | | | characters in ntfs_u28(). This fixes the conversion of filenames containing single-byte characters with the high bit set.
* - Don't cache_purge() in *_reclaim routines. vclean() does it for us sojeff2003-10-051-2/+0
| | | | this is redundant.
* - Support for multibyte charsets in LIBICONV.fjoe2003-09-267-48/+197
| | | | | | | | - CD9660_ICONV, NTFS_ICONV and MSDOSFS_ICONV kernel options (with corresponding modules). - kiconv(3) for loadable charset conversion tables support. Submitted by: Ryuichiro Imura <imura@ryu16.org>
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-261-1/+1
| | | | | | | | | contain the filedescriptor number on opens from userland. The index is used rather than a "struct file *" since it conveys a bit more information, which may be useful to in particular fdescfs and /dev/fd/* For now pass -1 all over the place.
* Revise and improve ntfs_subr.c 1.30: read only a single cluster at a timetjr2003-07-262-17/+28
| | | | | | | | | | in ntfs_writentvattr_plain and ntfs_readntvattr_plain, and purge the boot block from the buffer cache if isn't exactly one cluster long. These two changes work around the same buffer cache bug that ntfs_subr.c 1.30 tried to, but in a different way. This may decrease throughput by reading smaller amounts of data from the disk at a time, but may increase it by avoiding bogus writes of clean buffers. Problem (re)reported by Karel J. Bosschaart on -current.
* Merge from NetBSD src/sys/ntfs/ntfs_subr.c 1.5 & 1.30 (jdolecek):tjr2003-06-201-1/+15
| | | | | | | | | | | | - Avoid calling bread() with different sizes on the same blkno. Although the buffer cache is designed to handle differing size buffers, it erroneously tries to write the incorrectly-sized buffer buffer back to disk before reading the correctly-sized one, even when it's not dirty. This behaviour caused a panic for read-only NTFS mounts when INVARIANTS was enabled ("bundirty: buffer x still on queue y"), reported by NAKAJI Hiroyuki. - Fix a bug in the code handling holes: a variable was incremented instead of decremented, which could cause an infinite loop.
OpenPOWER on IntegriCloud