| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
not ACTIVECLEAR.
Submitted by: iedowse
Notes:
svn path=/head/; revision=142879
|
|
|
|
|
|
|
|
| |
Reviewed by: mckusick
MFC After: 1 week
Notes:
svn path=/head/; revision=142074
|
|
|
|
|
|
|
|
| |
The UFS_ functions are for UFS to call back into VFS. The VFS functions
are external entry points into the filesystem.
Notes:
svn path=/head/; revision=141526
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "business class upgrade" was implemented in UFS's VOP_LOCK
implementation ufs_lock() which is the wrong layer, so move it to
ffs_lock().
Also, as long as we have not abandonned advanced vfs-stacking we
should not preclude it from happening: instead of implementing a
copy locally, use the VOP_LOCK_APV(&ufs) to correctly arrive at
vop_stdlock() at the bottom.
Notes:
svn path=/head/; revision=141522
|
|
|
|
|
|
|
| |
Sponsored By: Isilon Systems, Inc.
Notes:
svn path=/head/; revision=140706
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm not sure why a credential was added to these in the first place, it is
not used anywhere and it doesn't make much sense:
The credentials for syncing a file (ability to write to the
file) should be checked at the system call level.
Credentials for syncing one or more filesystems ("none")
should be checked at the system call level as well.
If the filesystem implementation needs a particular credential
to carry out the syncing it would logically have to the
cached mount credential, or a credential cached along with
any delayed write data.
Discussed with: rwatson
Notes:
svn path=/head/; revision=140048
|
|
|
|
| |
Notes:
svn path=/head/; revision=139825
|
|
|
|
|
|
|
|
|
|
|
| |
prematurely report that they were full and/or to panic the kernel
with the message ``ffs_clusteralloc: allocated out of group''.
Submitted by: Henry Whincup <henry@jot.to>
MFC after: 1 week
Notes:
svn path=/head/; revision=138634
|
|
|
|
| |
Notes:
svn path=/head/; revision=138557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This eliminates a bunch of vnode overhead (approx 1-2 % speed
improvement) and gives us more control over the access to the storage
device.
Access counts on the underlying device are not correctly tracked and
therefore it is possible to read-only mount the same disk device multiple
times:
syv# mount -p
/dev/md0 /var ufs rw 2 2
/dev/ad0 /mnt ufs ro 1 1
/dev/ad0 /mnt2 ufs ro 1 1
/dev/ad0 /mnt3 ufs ro 1 1
Since UFS/FFS is not a synchrousely consistent filesystem (ie: it caches
things in RAM) this is not possible with read-write mounts, and the system
will correctly reject this.
Details:
Add a geom consumer and a bufobj pointer to ufsmount.
Eliminate the vnode argument from softdep_disk_prewrite().
Pick the vnode out of bp->b_vp for now. Eventually we
should find it through bp->b_bufobj->b_private.
In the mountcode, use g_vfs_open() once we have used
VOP_ACCESS() to check permissions.
When upgrading and downgrading between r/o and r/w do the
right thing with GEOM access counts. Remove all the
workarounds for not being able to do this with VOP_OPEN().
If we are the root mount, drop the exclusive access count
until we upgrade to r/w. This allows fsck of the root
filesystem and the MNT_RELOAD to work correctly.
Set bo_private to the GEOM consumer on the device bufobj.
Change the ffs_ops->strategy function to call g_vfs_strategy()
In ufs_strategy() directly call the strategy on the disk
bufobj. Same in rawread.
In ffs_fsync() we will no longer see VCHR device nodes, so
remove code which synced the filesystem mounted on it, in
case we came there. I'm not sure this code made sense in
the first place since we would have taken the specfs route
on such a vnode.
Redo the highly bogus readblock() function in the snapshot
code to something slightly less bogus: Constructing an uio
and using physio was really quite a detour. Instead just
fill in a bio and ship it down.
Notes:
svn path=/head/; revision=137035
|
|
|
|
|
|
|
|
|
| |
is ffs_copyonwrite() and the only place it can be called from is FFS which
would never want to call another filesystems copyonwrite method, should one
exist, so there is no reason why anything generic should know about this.
Notes:
svn path=/head/; revision=136963
|
|
|
|
|
|
|
| |
Found by: scottl
Notes:
svn path=/head/; revision=135312
|
|
|
|
|
|
|
| |
this file.
Notes:
svn path=/head/; revision=135303
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and the previously malloc'ed snapshot lock.
Malloc struct snapdata instead of just the lock.
Replace snapshot fields in cdev with pointer to snapdata (saves 16 bytes).
While here, give the private readblock() function a vnode argument
in preparation for moving UFS to access GEOM directly.
Notes:
svn path=/head/; revision=135138
|
|
|
|
|
|
|
|
| |
inode field based on UFS version. Use DIP ro read values and DIP_SET
to modify them throughout FFS code base.
Notes:
svn path=/head/; revision=132775
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
our cached 'next vnode' being removed from this mountpoint. If we
find that it was recycled, we restart our traversal from the start
of the list.
Code to do that is in all local disk filesystems (and a few other
places) and looks roughly like this:
MNT_ILOCK(mp);
loop:
for (vp = TAILQ_FIRST(&mp...);
(vp = nvp) != NULL;
nvp = TAILQ_NEXT(vp,...)) {
if (vp->v_mount != mp)
goto loop;
MNT_IUNLOCK(mp);
...
MNT_ILOCK(mp);
}
MNT_IUNLOCK(mp);
The code which takes vnodes off a mountpoint looks like this:
MNT_ILOCK(vp->v_mount);
...
TAILQ_REMOVE(&vp->v_mount->mnt_nvnodelist, vp, v_nmntvnodes);
...
MNT_IUNLOCK(vp->v_mount);
...
vp->v_mount = something;
(Take a moment and try to spot the locking error before you read on.)
On a SMP system, one CPU could have removed nvp from our mountlist
but not yet gotten to assign a new value to vp->v_mount while another
CPU simultaneously get to the top of the traversal loop where it
finds that (vp->v_mount != mp) is not true despite the fact that
the vnode has indeed been removed from our mountpoint.
Fix:
Introduce the macro MNT_VNODE_FOREACH() to traverse the list of
vnodes on a mountpoint while taking into account that vnodes may
be removed from the list as we go. This saves approx 65 lines of
duplicated code.
Split the insmntque() which potentially moves a vnode from one mount
point to another into delmntque() and insmntque() which does just
what the names say.
Fix delmntque() to set vp->v_mount to NULL while holding the
mountpoint lock.
Notes:
svn path=/head/; revision=131551
|
|
|
|
|
|
|
|
|
|
|
| |
snapshot itself in wrong order.
We can skip unlink check of that directory because it must have
snapshot in it.
Reviewed by: mckusick and current@
Notes:
svn path=/head/; revision=130690
|
|
|
|
|
|
|
|
| |
I mistakenly moved it to the ksegroup when breaking up the process
structure. Put it back in the proc structure.
Notes:
svn path=/head/; revision=130551
|
|
|
|
|
|
|
|
| |
Reviewed by: md5
Approved by: das (mentor)
Notes:
svn path=/head/; revision=130246
|
|
|
|
|
|
|
| |
Submitted by: bde
Notes:
svn path=/head/; revision=125764
|
|
|
|
|
|
|
|
|
| |
duplicate lock of same type" message.
Reviewed by: mckusick
Notes:
svn path=/head/; revision=125732
|
|
|
|
|
|
|
|
|
| |
Move diagnostic printf after vget. This might delay the debug
output some, but at least it keeps kernel from exploding if
DEBUG_VFS_LOCKS is in effect.
Notes:
svn path=/head/; revision=124119
|
|
|
|
|
|
|
| |
reversal.
Notes:
svn path=/head/; revision=122596
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce two new macros MNT_ILOCK(mp)/MNT_IUNLOCK(mp) to
operate on this mutex transparently.
Eventually new mutex will be protecting more fields in
struct mount, not only vnode list.
Discussed with: jeff
Notes:
svn path=/head/; revision=122091
|
|
|
|
|
|
|
|
|
|
| |
per-thread td_pflag which doesn't require any locks to read or write as it
is only read or written by curthread on itself.
Glanced at by: mckusick
Notes:
svn path=/head/; revision=121443
|
|
|
|
|
|
|
|
|
| |
file rather than panicing with "indiracct: botched params".
Submitted by: Mark Santcroos <marks@ripe.net>
Notes:
svn path=/head/; revision=121158
|
|
|
|
| |
Notes:
svn path=/head/; revision=120789
|
|
|
|
|
|
|
|
|
| |
ffs_snapshot() around.
- Acquire the interlock before releasing the mntvnode_mtx. Use the
interlock to protect v_usecount access.
Notes:
svn path=/head/; revision=120740
|
|
|
|
| |
Notes:
svn path=/head/; revision=116192
|
|
|
|
|
|
|
|
| |
making some local variables static. In a couple of cases, this means
removing an unused variable.
Notes:
svn path=/head/; revision=114293
|
|
|
|
|
|
|
|
|
| |
kg_nice is now protected by both. Being protected by both means that
other places in the kernel that want to read kg_nice only need one of the
two locks.
Notes:
svn path=/head/; revision=113872
|
|
|
|
|
|
|
| |
Tested by: Steve Kargl <sgk@troutmask.apl.washington.edu>
Notes:
svn path=/head/; revision=113376
|
|
|
|
| |
Notes:
svn path=/head/; revision=112451
|
|
|
|
|
|
|
|
| |
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
Notes:
svn path=/head/; revision=112367
|
|
|
|
|
|
|
|
|
|
|
| |
of a snapshot's copy of a superblock. This patch fixes a panic
when taking a snapshot of a 4096/512 filesystem.
Reported by: Ian Freislich <ianf@za.uu.net>
Sponsored by: DARPA & NAI Labs.
Notes:
svn path=/head/; revision=111972
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Define one flag GB_LOCK_NOWAIT that tells getblk() to pass the LK_NOWAIT
flag to the initial BUF_LOCK(). This will eventually be used in cases
were we want to use a buffer only if it is not currently in use.
- Convert all consumers of the getblk() api to use this extra parameter.
Reviwed by: arch
Not objected to by: mckusick
Notes:
svn path=/head/; revision=111856
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a snapshot. As part of taking a snapshot of a filesystem, the kernel
builds up a list of the filesystem metadata (such as the cylinder
group bitmaps) that are contained in the snapshot. When doing a
copy-on-write check, the list is first consulted. If the block being
written is found on the list, then the full snapshot lookup can be
avoided. Besides providing an important performance speedup this
check also avoids a potential deadlock between the code creating
the snapshot and the bufdaemon trying to cleanup snapshot related
buffers. This fix creates a temporary list containing the key
metadata blocks that can cause the deadlock. This temporary list
is used between the time that the snapshot is first enabled and the
time that the fully complete list is built.
Reported by: Attila Nagy <bra@fsn.hu>
Sponsored by: DARPA & NAI Labs.
Notes:
svn path=/head/; revision=111240
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is being taken from panicing with either "freeing free block" or
"freeing free inode". The problem arises when the snapshot code
is scanning the filesystem looking for inodes with a reference
count of zero (e.g., unlinked but still open) so that it can
expunge them from its view. If it encounters a reclaimed vnode
and has to restart its scan, then it will panic if it encounters
and tries to free an inode that it has already processed. The fix
is to check each candidate inode to see if it has already been
processed before trying to delete it from the snapshot image.
Sponsored by: DARPA & NAI Labs.
Notes:
svn path=/head/; revision=111239
|
|
|
|
|
|
|
|
|
|
| |
that they convert to 64-bit values before shifting rather than
afterwards. Once fixed, they can be used rather than inline expanded.
Sponsored by: DARPA & NAI Labs.
Notes:
svn path=/head/; revision=111238
|
|
|
|
|
|
|
| |
Approved by: trb
Notes:
svn path=/head/; revision=111119
|
|
|
|
|
|
|
| |
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Notes:
svn path=/head/; revision=109623
|
|
|
|
|
|
|
|
| |
Reported by: Aurelien Nephtali <aurelien.nephtali@wanadoo.fr>
Sponsored by: DARPA & NAI Labs.
Notes:
svn path=/head/; revision=108050
|
|
|
|
|
|
|
| |
Sponsored by: DARPA & NAI Labs.
Notes:
svn path=/head/; revision=108017
|
|
|
|
|
|
|
|
|
|
|
| |
so as to work correctly on 64-bit platforms.
Reported-by: Jake Burkholder <jake@locore.ca>
Sponsored by: DARPA & NAI Labs.
Approved by: Ian Dowse <iedowse@maths.tcd.ie>
Notes:
svn path=/head/; revision=107915
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that were copied in all of the earlier snapshots, thus its precomputed
list must be used in the copyonwrite test. Using incomplete lists may
lead to deadlock. Also do not include the blocks used for the indirect
pointers in the indirect pointers as this may lead to inconsistent
snapshots.
Sponsored by: DARPA & NAI Labs.
Approved by: re
Notes:
svn path=/head/; revision=107848
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
previously allocated block as the previous use of the block may
have fallen out of the cache. Failure to reread its contents cause
zeroed results to be written instead of the proper contents.
Conversely, when the block is going to be entirely filled in, it
is not necessary reread the old contents.
Sponsored by: DARPA & NAI Labs.
Approved by: re
Notes:
svn path=/head/; revision=107558
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
converting from individual vnode locks to the snapshot
lock, be sure to pass any waiting processes along to the
new lock as well. This transfer is done by a new function
in the lock manager, transferlockers(from_lock, to_lock);
Thanks to Lamont Granquist <lamont@scriptkiddie.org> for
his help in pounding on snapshots beyond all reason and
finding this deadlock.
Sponsored by: DARPA & NAI Labs.
Notes:
svn path=/head/; revision=107414
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Release the snapshot file lock while suspending the system. Otherwise
a process trying to read the lock may block on its containing directory
preventing the suspension from completing. Thanks to Sean Kelly
<smkelly@zombie.org> for finding this deadlock.
2) Replace some bdwrite's with bawrite's so as not to fill all the
buffers with dirty data. The buffers could not be cleaned as the
snapshot vnode was locked hence the system could deadlock when
making snapshots of really massive filesystems. Thanks to
Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> for figuring
this out.
Sponsored by: DARPA & NAI Labs.
Notes:
svn path=/head/; revision=107406
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.
Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.
Suggested by: BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by: DARPA & NAI Labs.
Notes:
svn path=/head/; revision=107294
|
|
|
|
|
|
|
| |
Approved by: re (jhb)
Notes:
svn path=/head/; revision=106965
|