summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs
Commit message (Collapse)AuthorAgeFilesLines
* Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag.attilio2012-11-091-1/+0
| | | | | Porters should refer to __FreeBSD_version 1000021 for this change as it may have happened at the same timeframe.
* Use NULL instead of 0 for pointerskevlo2012-07-221-1/+1
|
* Remove unused thread argument to vrecycle().trasz2012-04-231-2/+1
| | | | Reviewed by: kib
* Remove unused thread argument from vtruncbuf().trasz2012-04-234-12/+10
| | | | Reviewed by: kib
* This change creates a new list of active vnodes associated withmckusick2012-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | a mount point. Active vnodes are those with a non-zero use or hold count, e.g., those vnodes that are not on the free list. Note that this list is in addition to the list of all the vnodes associated with a mount point. To avoid adding another set of linkage pointers to the vnode structure, the active list uses the existing linkage pointers used by the free list (previously named v_freelist, now renamed v_actfreelist). This update adds the MNT_VNODE_FOREACH_ACTIVE interface that loops over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point). Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks
* Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL.mckusick2012-04-171-9/+2
| | | | | | | | | | | | | | | | | | | | | The primary changes are that the user of the interface no longer needs to manage the mount-mutex locking and that the vnode that is returned has its mutex locked (thus avoiding the need to check to see if its is DOOMED or other possible end of life senarios). To minimize compatibility issues for third-party developers, the old MNT_VNODE_FOREACH interface will remain available so that this change can be MFC'ed to 9. Following the MFC to 9, MNT_VNODE_FOREACH will be removed in head. The reason for this update is to prepare for the addition of the MNT_VNODE_FOREACH_ACTIVE interface that will loop over just the active vnodes associated with a mount point (typically less than 1% of the vnodes associated with the mount point). Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks
* Add I/O accounting to msdos filesystem.mckusick2012-04-081-0/+4
| | | | Suggested and reviewed by: kib
* Clean up style(9) nitskevlo2012-03-041-4/+4
|
* Use DOINGASYNC() to test for async allowance, to honor VFS syncing requests.kib2012-02-223-7/+7
| | | | | Noted by: bde MFC after: 1 week
* Fix found places where uio_resid is truncated to int.kib2012-02-211-2/+2
| | | | | | | | | Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from the usermode. Discussed with: bde, das (previous versions) MFC after: 1 month
* Make sure all intermediate variables holding mount flags (mnt_flag)mckusick2012-01-171-1/+1
| | | | | | | and that all internal kernel calls passing mount flags are declared as uint64_t so that flags in the top 32-bits are not lost. MFC after: 2 weeks
* Discarding local array based on return valueskevlo2011-12-221-14/+14
|
* Put all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.kib2011-11-225-1/+24
| | | | | | They are confusing to user, and not informative for general consumption. MFC after: 1 week
* Add unicode support to msdosfs and smbfs; original pathes from imura,kevlo2011-11-181-64/+48
| | | | | | bug fixes by Kuan-Chung Chiu <buganini at gmail dot com>. Tested by me in production for several days at work.
* This update changes the mnt_flag field in the mount structure frommckusick2011-07-241-1/+1
| | | | | | | | | | 32 bits to 64 bits and eliminates the unused mnt_xflag field. The existing mnt_flag field is completely out of bits, so this update gives us room to expand. Note that the f_flags field in the statfs structure is already 64 bits, so the expanded mnt_flag field can be exported without having to make any changes in the statfs structure. Approved by: re (bz)
* Add a lock flags argument to the VFS_FHTOVP() file systemrmacklem2011-05-221-1/+1
| | | | | | | | | | | method, so that callers can indicate the minimum vnode locking requirement. This will allow some file systems to choose to return a LK_SHARED locked vnode when LK_SHARED is specified for the flags argument. This patch only adds the flag. It does not change any file system to use it and all callers specify LK_EXCLUSIVE, so file system semantics are not changed. Reviewed by: kib
* Report EBUSY instead of EROFS for attempt of deleting or renaming thekib2011-03-251-2/+2
| | | | | | | | | | | | | root directory of msdosfs mount. The VFS code would handle deletion case itself too, assuming VV_ROOT flag is not lost. The msdosfs_rename() should also note attempt to rename root via doscheckpath() or different mount point check leading to EXDEV. Nonetheless, keep the checks for now. The change is inspired by NetBSD change referenced in PR, but return EBUSY like kern_unlinkat() does. PR: kern/152079 MFC after: 1 week
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Remove prtactive variable and related printf()s in the vop_inactivekib2010-11-191-5/+0
| | | | | | | | and vop_reclaim() methods. They seems to be unused, and the reported situation is normal for the forced unmount. MFC after: 1 week X-MFC-note: keep prtactive symbol in vfs_subr.c
* Fix a possible race where the directory dirent is moved to the locationkevlo2010-10-181-3/+8
| | | | | | | | | that was used by ".." entry. This change seems fixed panic during attempt to access msdosfs data over nfs. Reviewed by: kib MFC after: 1 week
* Ignore the return value of DE_INTERNALIZE().rpaulo2010-10-131-1/+1
|
* The r184588 changed the layout of struct export_args, causing an ABIkib2010-10-102-2/+4
| | | | | | | | | | breakage for old mount(2) syscall, since most struct <filesystem>_args embed export_args. The mount(2) is supposed to provide ABI compatibility for pre-nmount mount(8) binaries, so restore ABI to pre-r184588. Requested and reviewed by: bde MFC after: 2 weeks
* Add a comment describing the reason for calling cache_purge(fvp).kib2010-10-081-0/+7
| | | | | Requested by: danfe MFC after: 6 days
* The msdosfs lookup is case insensitive. Several aliases may be inserted forkib2010-10-071-0/+1
| | | | | | | | | | | a single directory entry. As a consequnce, name cache purge done by lookup for fvp when DELETE op for namei is specified, might be not enough to expunge all namecache entries that were installed for this direntry. Explicitely call cache_purge(fvp) when msdosfs_rename() succeeded. PR: kern/93634 MFC after: 1 week
* Style fixes and removal of unneeded variable.trasz2010-05-061-2/+1
| | | | Submitted by: bde@
* Move checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize().trasz2010-05-051-13/+2
| | | | Reviewed by: kib
* mountmsdosfs: reject too high value of bytes per clusteravg2010-04-021-0/+1
| | | | | | | | | | | | | | | Bytes per cluster are calcuated as bytes per sector times sectors per cluster. Too high value can overflow an internal variable with type that can hold only values in valid range. Trying to use a wider type results in an attempt to read more than MAXBSIZE at once, a panic. Unfortunately, it is FreeBSD newfs_msdos that produces filesystems with invalid parameters for certain types of media. Reported by: Fabian Keil <freebsd-listen@fabiankeil.de>, Paul B. Mahol <onemda@gmail.com> Discussed with: bde, kib MFC after: 1 week X-ToDo: fix newfs_msdos
* When returning error from msdosfs_lookup(), make sure that *vpp is NULL.kib2010-03-031-3/+6
| | | | | | | lookup() KASSERTs this condition. Reported and tested by: pho MFC after: 3 weeks
* Do not leak vnode lock when msdosfs mount is updated and specifiedkib2010-03-021-3/+2
| | | | | | | | | | device is different from the device used to the original mount. Note that update_mp does not need devvp locked, and pmp->pm_devvp cannot be freed meantime. Reported and tested by: pho MFC after: 3 weeks
* Only destroy pm_fatlock on error if it was initialized.kib2010-03-021-1/+1
| | | | MFC after: 3 weeks
* Mark msdosfs as mpsafe.kib2010-02-281-0/+1
| | | | | Tested by: pho MFC after: 3 weeks
* Fix the race between dotdot lookup and forced unmount, by usingkib2010-02-281-23/+81
| | | | | | | | | | | msdosfs-specific variant of vn_vget_ino(), msdosfs_deget_dotdot(). As was done for UFS, relookup the dotdot denode after the call to msdosfs_deget_dotdot(), because vnode lock is dropped and directory might be moved. Tested by: pho MFC after: 3 weeks
* Use pm_fatlock to protect per-filesystem rb tree used to allocate filenokib2010-02-281-10/+6
| | | | | | | on the large FAT volumes. Previously, a single global mutex was used. Tested by: pho MFC after: 3 weeks
* Add assertions for FAT bitmap state.kib2010-02-281-0/+8
| | | | | Tested by: pho MFC after: 3 weeks
* Use pm_fatlock to protect fat bitmap.kib2010-02-282-12/+38
| | | | | Tested by: pho MFC after: 3 weeks
* Add per-mountpoint lockmgr lock for msdosfs. It is intended to be usedkib2010-02-282-1/+19
| | | | | | | as fat bitmap lock and to replace global mutex protecting fileno rbtree. Tested by: pho MFC after: 3 weeks
* In msdosfs deget(), properly handle the case when the vnode is found in hash.kib2010-02-281-3/+2
| | | | | Tested by: pho MFC after: 3 weeks
* In msdosfs_inactive(), reclaim the vnodes both for SLOT_DELETED andkib2010-02-281-2/+2
| | | | | | | | | | SLOT_EMPTY deName[0] values. Besides conforming to FAT specification, it also clears the issue where vfs_hash_insert found the vnode in hash, and newly allocated vnode is vput()ed. There, deName[0] == 0, and vnode is not reclaimed, indefinitely kept on mountlist. Tested by: pho MFC after: 3 weeks
* Remove seemingly unneeded unlock/relock of the dvp in msdosfs_rmdir,kib2010-02-281-2/+0
| | | | | | | causing LOR. Reported and tested by: pho MFC after: 3 weeks
* Assert that the msdosfs vnode is (e)locked in several places.kib2010-02-282-8/+8
| | | | | | | | | | The plan is to use vnode lock to protect denode and fat cache, and having separate lock for block use map. Change the check and return on impossible condition into KASSERT(). Tested by: pho MFC after: 3 weeks
* Remove unused global statistic about fat cache usage.kib2010-02-281-21/+0
| | | | | Tested by: pho MFC after: 3 weeks
* Fix common misspelling of hierarchyuqs2010-02-201-1/+1
| | | | | Pointed out by: bf1783 at gmail Approved by: np (cxgb), kientzle (tar, etc.), philip (mentor)
* Invalid filesystem might cause the bp to be never read.kib2010-02-141-1/+2
| | | | | | Noted by: Pedro F. Giffuni <giffunip tutopia com> Obtanined from: NetBSD MFC after: 1 week
* Fix function name in the comment in the second location too.kib2010-02-131-1/+1
| | | | | Submitted by: ed MFC after: 1 week
* - Add idempotency guards so the structures can be used in other utilities.kib2010-02-136-23/+24
| | | | | | | | | | | | | - Update bpb structs with reserved fields. - In direntry struct join deName with deExtension. Although a fix was attempted in the past, these fields were being overflowed, Now this is consistent with the spec, and we can now share the WinChksum code with NetBSD. Submitted by: Pedro F. Giffuni <giffunip tutopia com> Mostly obtained from: NetBSD Reviewed by: bde MFC after: 2 weeks
* Use M_ZERO instead of calling bzero().kib2010-02-131-3/+2
| | | | | | Fix function name in the comment. MFC after: 1 week
* Remove unused macros.kib2010-02-131-3/+0
| | | | MFC after: 1 week
* Revert previous commit and add myself to the list of people who shouldphk2009-09-081-1/+0
| | | | know better than to commit with a cat in the area.
* Add necessary include.phk2009-09-081-0/+1
|
* Fix r193923 by noting that type of a_fp is struct file *, not int.kib2009-06-101-1/+1
| | | | | | | It was assumed that r193923 was trivial change that cannot be done wrong. MFC after: 2 weeks
OpenPOWER on IntegriCloud