summaryrefslogtreecommitdiffstats
path: root/sys/fs/ntfs
Commit message (Collapse)AuthorAgeFilesLines
* VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used inattilio2008-01-132-2/+2
| | | | | | | | | | | conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread to lower layer functions, when necessary. KPI results broken by this change, which should affect several ports, so version bumping and manpage update will be further committed. Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
* vn_lock() is currently only used with the 'curthread' passed as argument.attilio2008-01-102-2/+2
| | | | | | | | | | | | | | | | Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed. Manpage and FreeBSD_version will be updated through further commits. As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock. Tested by: Diego Sardina <siarodx at gmail dot com>, Andrea Di Pasquale <whyx dot it at gmail dot com>
* Remove explicit calling of lockmgr() with the NULL argument.attilio2008-01-081-8/+8
| | | | | | | | | | | | | | | | | | Now, lockmgr() function can only be called passing curthread and the KASSERT() is upgraded according with this. In order to support on-the-fly owner switching, the new function lockmgr_disown() has been introduced and gets used in BUF_KERNPROC(). KPI, so, results changed and FreeBSD version will be bumped soon. Differently from previous code, we assume idle thread cannot try to acquire the lockmgr as it cannot sleep, so loose the relative check[1] in BUF_KERNPROC(). Tested by: kris [1] kib asked for a KASSERT in the lockmgr_disown() about this condition, but after thinking at it, as this is a well known general rule, I found it not really necessary.
* o Mask maximum file permissions we get from mount_ntfs -mmaxim2007-11-171-1/+2
| | | | | | | | | with ACCESSPERMS. Document in mount_ntfs(8) only the nine low-order bits of mask are used (taken from mount_msdosfs(8)). PR: kern/114856 Submitted by: Ighighi MFC after: 1 month
* o Do not leak inodes hash table at module unload.maxim2007-11-131-0/+1
| | | | | | PR: kern/118017 Submitted by: Ighighi MFC after: 1 week
* Get rid of qaddr_t.alfred2007-10-161-2/+2
| | | | Requested by: bde
* Disable multiple ntfs mounts to the same mountpoint.rodrigc2007-09-211-1/+15
| | | | | | | | | | | | Eliminates panics due to locking issues. Idea taken from src/sys/gnu/fs/xfs/FreeBSD/xfs_super.c. PR: 89966, 92000, 104393 Reported by: H. Matsuo <hiroshi50000 yahoo co jp>, Chris <m2chrischou gmail.com>, Andrey V. Elsukov <bu7cher yandex ru>, Jan Henrik Sylvester <me janh de> Approved by: re (kensmith)
* Make insmntque() externally visibile and allow it to fail (e.g. duringtegge2007-03-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | late stages of unmount). On failure, the vnode is recycled. Add insmntque1(), to allow for file system specific cleanup when recycling vnode on failure. Change getnewvnode() to no longer call insmntque(). Previously, embryonic vnodes were put onto the list of vnode belonging to a file system, which is unsafe for a file system marked MPSAFE. Change vfs_hash_insert() to no longer lock the vnode. The caller now has that responsibility. Change most file systems to lock the vnode and call insmntque() or insmntque1() after a new vnode has been sufficiently setup. Handle failed insmntque*() calls by propagating errors to callers, possibly after some file system specific cleanup. Approved by: re (kensmith) Reviewed by: kib In collaboration with: kib
* Check that the error returned by vfs_getopts() is not ENOENT before assumingcognet2007-02-211-2/+2
| | | | | | there's actually an error. This is just in order to unbreak ntfs on current, before a proper solution is committed.
* Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.pjd2007-02-152-20/+22
| | | | | | | | | | | | | | | | This way we may support multiple structures in v_data vnode field within one file system without using black magic. Vnode-to-file-handle should be VOP in the first place, but was made VFS operation to keep interface as compatible as possible with SUN's VFS. BTW. Now Solaris also implements vnode-to-file-handle as VOP operation. VFS_VPTOFH() was left for API backward compatibility, but is marked for removal before 8.0-RELEASE. Approved by: mckusick Discussed with: many (on IRC) Tested with: ufs, msdosfs, cd9660, nullfs and zfs
* Fix an integer overflow and allow access to files larger than 4GB onle2006-11-203-19/+19
| | | | NTFS.
* Fake the link count until we have no choice but to load data from thetrhodes2006-10-211-1/+1
| | | | | | | MFT. PR: 86965 Submitted by: Lowell Gilbert <lgfbsd@be-well.ilk.org>
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.tegge2006-09-261-0/+4
| | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
* 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.
OpenPOWER on IntegriCloud