Revision
9488 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 20:07:14 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9457
Post-r248567, there were times when the client would return a
truncated directory for some NFS servers. This turned out to
be because the size of a directory reported by an NFS server
can be smaller that the ufs-like directory created from the
RPC XDR in the client. This patch fixes the problem by changing
r248567 so that vnode_pager_setsize() is only done for regular files.
Revision
9457 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:36:04 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9455
Rework the handling of stop signals in the NFS client. The changes in
195702, 195703, and 195821 prevented a thread from suspending while holding
locks inside of NFS by forcing the thread to fail sleeps with EINTR or
ERESTART but defer the thread suspension to the user boundary. However,
this had the effect that stopping a process during an NFS request could
abort the request and trigger EINTR errors that were visible to userland
processes (previously the thread would have suspended and completed the
request once it was resumed).
This change instead effectively masks stop signals while in the NFS client.
It uses the existing TDF_SBDRY flag to effect this since SIGSTOP cannot
be masked directly. Instead of setting PBDRY on individual sleeps, change
the VFS_*() and VOP_*() methods to defer stop signals for filesystems which
request this behavior via a new VFCF_SBDRY flag. Note that this has to be
a VFC flag rather than a MNTK flag so that it works properly with
VFS_MOUNT() when the mount is not yet fully constructed. For now, only the
NFS clients set this new flag in VFS_SET().
A few other related changes:
- Add an assertion to ensure that TDF_SBDRY doesn't leak to userland.
- When a lookup request uses VOP_READLINK() to follow a symlink, mark
the request as being on behalf of the thread performing the lookup
(cnp_thread) rather than using a NULL thread pointer. This causes
NFS to properly handle signals during this VOP on an interruptible
mount.
- Ignore thread suspend requests due to SIGSTOP if stop signals are
currently deferred. This can occur if a process is stopped via
SIGSTOP while a thread is running or runnable but before it has set
TDF_SBDRY.
Obtained from: FreeBSD
Revision
9455 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 5 19:34:22 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9428
Add currently unused flag argument to the cluster_read(),
cluster_write() and cluster_wbuild() functions. The flags to be
allowed are a subset of the GB_* flags for getblk().
Revision
9424 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 22:54:00 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9393
- Fix nullfs vnode reference leak in nullfs_reclaim_lowervp(). The
null_hashget() obtains the reference on the nullfs vnode, which must
be dropped.
- Fix a wart which existed from the introduction of the nullfs
caching, do not unlock lower vnode in the nullfs_reclaim_lowervp().
It should be innocent, but now it is also formally safe. Inform the
nullfs_reclaim() about this using the NULLV_NOUNLOCK flag set on
nullfs inode.
- Add a callback to the upper filesystems for the lower vnode
unlinking. When inactivating a nullfs vnode, check if the lower
vnode was unlinked, indicated by nullfs flag NULLV_DROP or VV_NOSYNC
on the lower vnode, and reclaim upper vnode if so. This allows
nullfs to purge cached vnodes for the unlinked lower vnode, avoiding
excessive caching.
Revision
9393 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 21:27:20 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9330
Do a sync of the devvp vnode for the mount, which buffers, among other
things, contain FAT blocks. This makes fsync(2) for msdosfs more correct
by syncing the metadata needed to read the synced data.
Revision
9330 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 15:59:04 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9329
When an NFS unmount occurs, once vflush() writes the last dirty
buffer for the last vnode on the mount back to the server, it
returns. At that point, the code continues with the unmount,
including freeing up the nfs specific part of the mount structure.
It is possible that an nfsiod thread will try to check for an
empty I/O queue in the nfs specific part of the mount structure
after it has been free'd by the unmount. This patch avoids this problem by
setting the iodmount entries for the mount back to NULL while holding the
mutex in the unmount and checking the appropriate entry is non-NULL after
acquiring the mutex in the nfsiod thread.
Obtained from: FreeBSD svn 250258
Revision
9329 -
Directory Listing
-
[select for diffs]
Modified
Sat Mar 4 15:58:07 2017 UTC
(7 years, 2 months ago)
by
laffer1
Diff to
previous 9033
Both NFS clients can deadlock when using the "rdirplus" mount
option. This can occur when an nfsiod thread that already holds
a buffer lock attempts to acquire a vnode lock on an entry in
the directory (a LOR) when another thread holding the vnode lock
is waiting on an nfsiod thread. This patch avoids the deadlock by disabling
readahead for this case, so the nfsiod threads never do readdirplus.
Since readaheads for directories need the directory offset cookie
from the previous read, they cannot normally happen in parallel.
As such, testing by jhb@ and myself didn't find any performance
degredation when this patch is applied. If there is a case where
this results in a significant performance degradation, mounting
without the "rdirplus" option can be done to re-enable readahead
for directories.
Obtained from: FreeBSD svn 250257
Revision
8860 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 26 13:04:34 2016 UTC
(7 years, 7 months ago)
by
laffer1
Diff to
previous 8815
more properly handle interrupted NFS requests on an interruptible mount by rewturning an error of EINTER rather than EACCESS.
Revision
8797 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 26 03:25:36 2016 UTC
(7 years, 7 months ago)
by
laffer1
Diff to
previous 8796
stop translating the ERRESTART error from the open(2) into EINTR. Posix requires that open(2) is restartable for SA_RESTART.
Revision
8763 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 26 02:43:05 2016 UTC
(7 years, 7 months ago)
by
laffer1
Diff to
previous 8762
Backup FATs were sometimes marked dirty by copying their first block from the primary FAT, and then not marked clean. Force them to be clean
Revision
8666 -
Directory Listing
-
[select for diffs]
Modified
Sun Sep 25 20:32:40 2016 UTC
(7 years, 7 months ago)
by
laffer1
Diff to
previous 8650
disable the reallocation code. testing with fsx has revealed problems and in order to hunt the bugs reduce complexity.
Revision
8471 -
Directory Listing
-
[select for diffs]
Modified
Sun Sep 18 22:25:22 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8313
add two new options to the nfssvc(2) syscall that allow processes running as root to suspend and resume execution of nfsd
Revision
8154 -
Directory Listing
-
[select for diffs]
Modified
Fri Sep 16 22:22:46 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8136
fix pseudo checksum calculation. this fixes ipfilter with network controllers that mplement partial rx csum offload
Revision
8087 -
Directory Listing
-
[select for diffs]
Modified
Thu Sep 15 22:43:25 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 8029
deadfs VOPs for vop_ioctl and vop_bmap call itself recursively, which is an elaborate way to cause kernel panic. change the vops implementation to return EBADF for a reclaimed vnode.
Revision
7930 -
Directory Listing
-
[select for diffs]
Modified
Wed Sep 14 21:09:43 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7912
Extend the KPI to lock and unlock f_offset member of struct file. It
now fully encapsulates all accesses to f_offset, and extends f_offset
locking to other consumers that need it, in particular, to lseek() and
variants of getdirentries().
Revision
7804 -
Directory Listing
-
[select for diffs]
Modified
Tue Sep 6 02:56:10 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 7800
In pget(9), if PGET_NOTWEXIT flag is not specified, also search the
zombie list for the pid. This allows several kern.proc sysctls to
report useful information for zombies.
Hold the allproc_lock around all searches instead of relocking it.
Remove private pfind_locked() from the new nfs client code.
Look for zombie process only if we were given process id.
Obtained from: FreeBSD
Revision
7800 -
Directory Listing
-
[select for diffs]
Modified
Mon Sep 5 19:36:58 2016 UTC
(7 years, 8 months ago)
by
laffer1
Diff to
previous 6632
ext2fs fix
While a file is first being written, the dynamic block reallocation realocates t
he file's blocks so as to cluster them together into a contiguous set of blocks
on the disk.
When the cluster crosses the boundary into the first indirect block, the first i
ndirect block is initially allocated in a position immediately following the las
t direct block. Block reallocation would usually destroy locality by moving the
indirect block of the way to keep the data blocks contiguous.
Obtained from: FreeBSD svn 243913
Revision
5879 -
Directory Listing
-
[select for diffs]
Modified
Mon Apr 29 22:28:19 2013 UTC
(11 years ago)
by
laffer1
Diff to
previous 5677
Fix a security vulnerability in nfsserver which can allow clients who send malformed requests (readdir) with a file as the path can corrupt memory or do other nasty things.
Fix obtained from: FreeBSD
Revision
5076 -
Directory Listing
-
[select for diffs]
Modified
Sat Jul 21 15:17:36 2012 UTC
(11 years, 10 months ago)
by
laffer1
Diff to
previous 4831
This commit was generated by cvs2svn to compensate for changes in r5075,
which included commits to RCS files with non-trunk default branches.
Revision
4826 -
Directory Listing
-
[select for diffs]
Modified
Mon Apr 9 16:38:24 2012 UTC
(12 years, 1 month ago)
by
laffer1
Diff to
previous 4775
Change how tmpfs calculates available pages.
This stops a lot of problems with ZFS enabled and small swap sizes.
Obtained from: FreeBSD (svn 227802)
Revision
4723 -
Directory Listing
-
[select for diffs]
Modified
Fri Mar 16 02:02:53 2012 UTC
(12 years, 2 months ago)
by
laffer1
Diff to
previous 4672
Fix several issues with unionfs including access via threads, including devfs and and sockets on a md with a unionfs mount.
Revision
4203 -
Directory Listing
-
[select for diffs]
Modified
Sun Oct 9 22:03:38 2011 UTC
(12 years, 7 months ago)
by
laffer1
Diff to
previous 4017
Supply unique st_dev, st_ino value pair for fstat(2) on pipes. This is required with sus4 and fixes compatibility problems with several linux centric daemons. This is a port from FreeBSD 10-CURRENT.
Filter out some bad traffic with ipv6 /ipfw.
Revision
3909 -
Directory Listing
-
[select for diffs]
Modified
Thu Apr 14 04:04:02 2011 UTC
(13 years, 1 month ago)
by
laffer1
Diff to
previous 3886
Handle the special ruleset 0 in devfs_ruleset_use(). An attempt set the
current ruleset to 0 with command "devfs ruleset 0" triggered a KASSERT
in devfs_ruleset_create().
Revision
3886 -
Directory Listing
-
[select for diffs]
Modified
Sun Mar 13 21:43:59 2011 UTC
(13 years, 2 months ago)
by
laffer1
Diff to
previous 3554
Bring in two large changes from FreeBSD 7.1:
* DRM/DRI update for direct rendering on X. This is a large update to support newer ATI and Intel graphics adapters with acceleration. This was original ported from Linux (it's not GPL)
* cdev per open file data.
Implement the per-open file data for the cdev.
The patch does not change the cdevsw KBI. Management of the data is
provided by the functions
int devfs_set_cdevpriv(void *priv, cdevpriv_dtr_t dtr);
int devfs_get_cdevpriv(void **datap);
void devfs_clear_cdevpriv(void);
All of the functions are supposed to be called from the cdevsw method
contexts.
- devfs_set_cdevpriv assigns the priv as private data for the file
descriptor which is used to initiate currently performed driver
operation. dtr is the function that will be called when either the
last refernce to the file goes away, the device is destroyed or
devfs_clear_cdevpriv is called.
- devfs_get_cdevpriv is the obvious accessor.
- devfs_clear_cdevpriv allows to clear the private data for the still
open file.
Implementation keeps the driver-supplied pointers in the struct
cdev_privdata, that is referenced both from the struct file and struct
cdev, and cannot outlive any of the referee.
Obtained from: FreeBSD
Revision
3207 -
Directory Listing
-
[select for diffs]
Modified
Sun Dec 13 01:09:44 2009 UTC
(14 years, 5 months ago)
by
laffer1
Diff to
previous 3128
Add the fdclone KPI. fdclone was originally developed for FreeBSD7-CURRENT by Kostik Belousov and Peter Holm.
This was developed to allow drivers to clone on open(2). The cloned cdev is
not accessible for lookup through devfs and is destroyed automatically.
The implementation is based on version 9 of Kostik's patch. I've also included
a sample program in share/examples/kld/fdclone on use.
$MidnightBSD$ tagged in share/examples/kld
Revision
1133 -
Directory Listing
-
[select for diffs]
Modified
Thu Aug 2 08:33:00 2007 UTC
(16 years, 9 months ago)
by
laffer1
Diff to
previous 1122
Fix interaction with Windows 2000/XP servers. If a newly created directory has exactly 50 entries, an error is generated as smbfs grabs 52 items at a time. With . and .. this is 52. It then returns on the second trip and causes some apps like rsync to generate errors.
Revision
890 -
Directory Listing
-
[select for diffs]
Modified
Tue Apr 3 13:30:31 2007 UTC
(17 years, 1 month ago)
by
laffer1
Diff to
previous 658
Remove bandaid.
Giant was locked on calls to sorecieve() and sosend() to fix a race condition which shouldn't be a problem anymore.
Revision
587 -
Directory Listing
-
[select for diffs]
Modified
Sat Jan 13 00:02:53 2007 UTC
(17 years, 4 months ago)
by
laffer1
Diff to
previous 547
Sync with FreeBSD 6.1 Release.
Introduce several patches to stop potential deadlocks with snapshots. Clean up the vm code.
Revision
547 -
Directory Listing
-
[select for diffs]
Modified
Sun Jan 7 04:26:25 2007 UTC
(17 years, 4 months ago)
by
laffer1
Diff to
previous 545
Change pfs_visible() to optionally return with the process still locked to simply locking and close some race conditions.
Revision
333 -
Directory Listing
-
[select for diffs]
Modified
Wed Nov 29 17:09:59 2006 UTC
(17 years, 5 months ago)
by
laffer1
Diff to
previous 332
Minor adjustment on the value for "short filename" situations to match freebsd's behavior. Using -1 makes more sense.
Revision
45 -
Directory Listing
-
[select for diffs]
Modified
Fri Aug 4 12:57:36 2006 UTC
(17 years, 9 months ago)
by
laffer1
Diff to
previous 6
Fixed a bug in smbfs where an attacker can escape a chroot environment. See FreeBSD-SA-06:16.smbfs
Revision
6 -
Directory Listing
-
[select for diffs]
Modified
Sat Feb 25 02:38:42 2006 UTC
(18 years, 2 months ago)
by
laffer1
Diff to
previous 3
This commit was generated by cvs2svn to compensate for changes in r5, which
included commits to RCS files with non-trunk default branches.
Revision
3 -
Directory Listing
-
[select for diffs]
Added
Sat Feb 25 02:29:52 2006 UTC
(18 years, 2 months ago)
by
laffer1
This commit was generated by cvs2svn to compensate for changes in r2, which
included commits to RCS files with non-trunk default branches.