summaryrefslogtreecommitdiffstats
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
* change vop_lock handling to allowing tracking of callers' file and line forkmacy2006-11-131-9/+11
| | | | | | acquisition of lockmgr locks Approved by: scottl (standing in for mentor rwatson)
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-066-43/+84
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* Aquire Giant in the softdep_flush for clear_remove() and clear_inodedeps()kib2006-11-011-0/+7
| | | | | | | | processing when QUOTA is set. Reported and tested by: Peter Holm Reviewed by: tegge MFC after: 3 days
* Add gjournal specific code to the UFS file system:pjd2006-10-317-4/+247
| | | | | | | | | | | | | | | | - Add FS_GJOURNAL flag which enables gjournal support on a file system. - Add cg_unrefs field to the cylinder group structure which holds number of unreferenced (orphaned) inodes in the given cylinder group. - Add fs_unrefs field to the super block structure which holds total number of unreferenced (orphaned) inodes. - When file or a directory is orphaned (last reference is removed, but object is still open), increase fs_unrefs and cg_unrefs fields, which is a hint for fsck in which cylinder groups looks for such (orphaned) objects. - When file is last closed, decrease {fs,cg}_unrefs fields. - Add VV_DELETED vnode flag which points at orphaned objects. Sponsored by: home.pl
* Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.hrwatson2006-10-222-2/+4
| | | | | | | | | | | | | begun with a repo-copy of mac.h to mac_framework.h. sys/mac.h now contains the userspace and user<->kernel API and definitions, with all in-kernel interfaces moved to mac_framework.h, which is now included across most of the kernel instead. This change is the first step in a larger cleanup and sweep of MAC Framework interfaces in the kernel, and will not be MFC'd. Obtained from: TrustedBSD Project Sponsored by: SPARTA
* Do not translate the IN_ACCESS inode flag into the IN_MODIFIED while filesystemkib2006-10-105-34/+89
| | | | | | | | | | | | | | | is suspending/suspended. Doing so may result in deadlock. Instead, set the (new) IN_LAZYACCESS flag, that becomes IN_MODIFIED when suspend is lifted. Change the locking protocol in order to set the IN_ACCESS and timestamps without upgrading shared vnode lock to exclusive (see comments in the inode.h). Before that, inode was modified while holding only shared lock. Tested by: Peter Holm Reviewed by: tegge, bde Approved by: pjd (mentor) MFC after: 3 weeks
* Correct check for when IO_SYNC should be set for filesystemtegge2006-10-021-2/+2
| | | | | | not using softupdates when truncating a directory to zero length. Discussed with: bde
* Protect change to bo_flag by holding the bufobj mutex.tegge2006-09-261-0/+2
|
* Reduce fluctuations of mnt_flag to allow unlocked readers to get ategge2006-09-261-2/+1
| | | | slightly more consistent view.
* Don't restore MNT_QUOTA bit in mnt_flag after snapshot creation,tegge2006-09-261-1/+1
| | | | closing a race between nmount() and quotactl().
* Increase mnt_noasync once in softdep_mount() to disallow async io,tegge2006-09-261-0/+5
| | | | | | | closing a window where a file system using softupdates could be async for a short while if both MNT_UPDATE and MNT_ASYNC were passed as flags to nmount(). Add MNTK_SOFTDEP flag to ensure that softdep_mount() doesn't increase mnt_noasync multiple times.
* Add mnt_noasync counter to better handle interleaved calls to nmount(),tegge2006-09-261-1/+1
| | | | | | sync() and sync_fsync() without losing MNT_ASYNC. Add MNTK_ASYNC flag which is set only when MNT_ASYNC is set and mnt_noasync is zero, and check that flag instead of MNT_ASYNC before initiating async io.
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.tegge2006-09-264-15/+57
| | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
* Fix the glitch introduced in rev. 1.93. In softdep_sync_metadata(),kib2006-09-201-2/+3
| | | | | | | | | | | | switch by worklist type contains two for() loops, for D_INDIRDEP and D_PAGEDEP. On error, these loops are exited by break, where the switch actually shall be leaved. Use goto instead of break to reach the error handling code. Reported by: Peter Holm Reviewed by: tegge Approved by: pjd (mentor) MFC after: 2 weeks
* Declare security and security.bsd sysctl hierarchies in sysctl.h alongrwatson2006-09-171-2/+0
| | | | | | | | with other commonly used sysctl name spaces, rather than declaring them all over the place. MFC after: 1 month Sponsored by: nCircle Network Security, Inc.
* While checking for update of snapshot file in the ffs_copyonwrite,kib2006-08-211-1/+1
| | | | | | | | | | | first filter out metadata update. Otherwise, devfs vnode could be erronously interpreted as ufs one, causing further check of i_flags to use random memory. PR: kern/100365 Debugged and fix described by: tegge Approved by: pjd (mentor) MFC after: 2 weeks
* Correct typo in comment.pjd2006-08-201-1/+1
|
* Rather than print out a nice error message giving details sufficent to fixobrien2006-07-311-3/+5
| | | | | a 'ufs_dirbad' and then panicing (making it very hard to see the details), put them in the panic message itself.
* Drop two unnecessary casts.stefanf2006-07-181-2/+2
|
* The ufs_lookup.c has a critical bug around the whiteoutdaichi2006-07-111-2/+10
| | | | | | | | | | | | | | process. UFS must check a whiteout name when it uses the whiteout, but the current implementation does not check the whileout name, so sometimes UFS writes over a wrong whtieout. UFS *MUST* check the whiteout name to use a corrent whiteout. This bug leads unionfs. panic. This commit fixes this trouble. Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: tegge & rodrigc (mentor) Approved by: rodrigc (mentor) MFC after: 2 weeks
* Declare UFS module version.pjd2006-07-091-0/+1
|
* Change fs->fs_fsmnt to mp->mnt_stat.f_mntonname in warnings about missingpjd2006-07-091-2/+2
| | | | | | | MAC and ACLs support in the kernel. If it is a first mount, fs->fs_fsmnt is empty. MFC after: 1 week
* Check the sectorsize of the underlying disk before trying torodrigc2006-06-031-1/+8
| | | | | | | | | bread() the UFS superblock. Should eliminate crashes when trying to do: mount -t ufs on an audio CD. PR: kern/85893 Reported by: Russell Francis <rfrancis at ev dot net> MFC after: 1 week
* o Rearrange and remove incorrect comments.maxim2006-05-311-8/+3
| | | | Requested by: bde
* o According to POSIX, the result of ftruncate(2) is unspecifiedmaxim2006-05-311-4/+22
| | | | | | | | | | | | for file types other than VREG, VDIR and shared memory objects. We already handle VREG, VLNK and VDIR cases. Silently ignore truncate requests for all the rest. Adjust comments. PR: kern/98064 Submitted by: bde Security: local DoS Regress. test: regression/fifo/fifo_misc MFC after: 2 weeks
* Remove "update" from ffs_opts. It has been moved to global_optsrodrigc2006-05-261-4/+1
| | | | in vfs_mount.c.
* Remove calls to vfs_export() for exporting a filesystem for NFS mountingrodrigc2006-05-261-18/+0
| | | | | from individual filesystems. Call it instead in vfs_mount.c, after we call VFS_MOUNT() for a specific filesystem.
* Take errmsg out of ffs_opts. It is already part of global_optsrodrigc2006-05-241-1/+1
| | | | in vfs_mount.c.
* o Fix a comment: ufs2_dinode.di_blocks counts blocks not bytes actually held.maxim2006-05-211-1/+1
|
* o Fix a comment: directory whiteout type is DT_WHT not DT_W.maxim2006-05-211-1/+1
|
* Provide a less cryptic panic message in place of just "found inode."trhodes2006-05-161-1/+2
|
* Read block hints list from last snapshot on the active snapshot list.tegge2006-05-161-0/+4
|
* Copy last block on file system again after file system has been suspended.tegge2006-05-151-0/+11
| | | | Obtained from: NetBSD
* Don't leak a locked buffer if last block on file system cannot be read.tegge2006-05-151-2/+3
|
* Errors detected while file system is suspended should not trigger antegge2006-05-151-6/+4
| | | | assertion failure.
* Expunge traces of unlinked snapshot files when making a new snapshot.tegge2006-05-131-2/+9
|
* Bring the call to softdep_releasefile() within the region protected bytegge2006-05-091-3/+7
| | | | | vn_start_secondary_write() since it might cause file system write activity (e.g. ffs_snapremove()).
* ffs_syncvnode() might skip some of the blocks due to them being locked,tegge2006-05-061-0/+46
| | | | | | | | | | | | assuming them to be inflight write buffers. This is not always the case. bufdaemon might hold the buffer lock and give up writing the buffer due to it having dependencies, the file system being suspended or the vnode lock being held by another thread. When bufdaemon decides to write the buffer there is still a window before bufobj_wref() has been called, allowing other threads to believe that the vnode has no dirty buffers or inflight writes. Try harder to flush first block of new subdirectory to get rid of MKDIR_BODY dependency.
* Return error if vnode was reclaimed while it was temporarily unlocked.tegge2006-05-051-1/+11
| | | | Add missing calls to vn_finished_write() in error handling.
* Turn off disk quotas for snapshot files.tegge2006-05-052-0/+38
|
* Avoid locking overhead when snapshots are disabled.tegge2006-05-051-0/+4
|
* - Set bio_done directly to NULL to indicate that we want to wait for the bio.pjd2006-05-051-5/+2
| | | | | | - Use biowait() instead of copying the code. MFC after: 1 month
* Detect the snapshot file being prematurely unlinked.tegge2006-05-031-0/+10
|
* Temporarily undo clusters contribution to global runningbufspace whiletegge2006-05-031-0/+4
| | | | handling copy on write for the buffers taking part in the cluster.
* A side effect of calling runningbufwakeup() is that bp->b_runningbufspace istegge2006-05-031-3/+10
| | | | | cleared. Save old value and restore bp->b_runningbufspace before returning from ffs_copyonwrite().
* Close a race when VOP_LOCK() on a snapshot file is attempted at thetegge2006-05-022-42/+110
| | | | | | same time as it is changed back into a normal file. The locker would get the shared "snaplk" lock which would no longer be the correct lock for the vnode.
* Fix a typo.scottl2006-04-281-1/+1
|
* - Add a BO_NEEDSGIANT flag to the bufobj. This flag forces all childjeff2006-04-281-1/+7
| | | | | | buffers to go on the buf daemon's DIRTYGIANT queue. - Set BO_NEEDSGIANT on ffs's devvp since the ffs_copyonwrite handler runs in the context of the buf daemon and may require Giant.
* Revert previous to this file before an actual request is made.trhodes2006-04-221-0/+12
|
* Remove what I believe are two useless ifdefs. If a user or administratortrhodes2006-04-211-12/+0
| | | | | | | | | | enables multilabel, or any option for that matter, most likely they have a reason. This will allow users to see that mulilabel is enabled via an issued "mount" command and remove an annoying warning - printed only when a MAC kernel is not installed - on boot up. Discussed with: green, brueffer, Samy Al Bahra. Probably ran past: csjp (though I can't remember).
OpenPOWER on IntegriCloud