fs: clean up empty lines in .c and .h files
This commit is contained in:
parent
50cedfede3
commit
586ee69f09
@ -535,7 +535,6 @@ autofs_trigger(struct autofs_node *anp,
|
||||
"error %d", anp->an_retries, error);
|
||||
anp->an_retries = 0;
|
||||
return (error);
|
||||
|
||||
}
|
||||
AUTOFS_DEBUG("trigger failed with error %d; will retry in "
|
||||
"%d seconds, %d attempts left", error, autofs_retry_delay,
|
||||
|
@ -204,7 +204,6 @@ autofs_vget_callback(struct mount *mp, void *arg, int flags,
|
||||
struct vnode **vpp)
|
||||
{
|
||||
|
||||
|
||||
return (autofs_node_vn(arg, mp, flags, vpp));
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,6 @@ typedef struct {
|
||||
dev_t iso_rdev; /* Major/Minor number for special */
|
||||
} ISO_RRIP_INODE;
|
||||
|
||||
|
||||
struct iso_node {
|
||||
struct vnode *i_vnode; /* vnode associated with this inode */
|
||||
cd_ino_t i_number; /* the identity of the inode */
|
||||
|
@ -135,7 +135,6 @@ cd9660_rrip_slink(p,ana)
|
||||
pcomp < pcompe;
|
||||
pcomp = (ISO_RRIP_SLINK_COMPONENT *)((char *)pcomp + ISO_RRIP_SLSIZ
|
||||
+ isonum_711(pcomp->clen))) {
|
||||
|
||||
if (!cont) {
|
||||
if (len < ana->maxlen) {
|
||||
len++;
|
||||
@ -148,7 +147,6 @@ cd9660_rrip_slink(p,ana)
|
||||
wlen = 0;
|
||||
|
||||
switch (*pcomp->cflag) {
|
||||
|
||||
case ISO_SUSP_CFLAG_CURRENT:
|
||||
/* Inserting Current */
|
||||
wlen = 1;
|
||||
@ -207,7 +205,6 @@ cd9660_rrip_slink(p,ana)
|
||||
memcpy(outbuf, inbuf, wlen);
|
||||
outbuf += wlen;
|
||||
len += wlen;
|
||||
|
||||
}
|
||||
ana->outbuf = outbuf;
|
||||
*ana->outlen = len;
|
||||
@ -391,7 +388,6 @@ cd9660_rrip_tstamp(p,ana)
|
||||
cd9660_tstamp_conv17(ptime,&ana->inop->inode.iso_ctime);
|
||||
else
|
||||
ana->inop->inode.iso_ctime = ana->inop->inode.iso_mtime;
|
||||
|
||||
}
|
||||
ana->fields &= ~ISO_SUSP_TSTAMP;
|
||||
return ISO_SUSP_TSTAMP;
|
||||
|
@ -181,7 +181,6 @@ cd9660_open(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
cd9660_getattr(ap)
|
||||
struct vop_getattr_args /* {
|
||||
|
@ -37,7 +37,6 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Analyze function flag (similar to RR field bits)
|
||||
*/
|
||||
|
@ -274,7 +274,6 @@ cuse_kern_uninit(void *arg)
|
||||
void *ptr;
|
||||
|
||||
while (1) {
|
||||
|
||||
printf("Cuse: Please exit all /dev/cuse instances "
|
||||
"and processes which have used this device.\n");
|
||||
|
||||
@ -356,7 +355,6 @@ cuse_str_filter(char *ptr)
|
||||
int c;
|
||||
|
||||
while (((c = *ptr) != 0)) {
|
||||
|
||||
if ((c >= 'a') && (c <= 'z')) {
|
||||
ptr++;
|
||||
continue;
|
||||
@ -514,7 +512,6 @@ cuse_client_is_closing(struct cuse_client *pcc)
|
||||
pcc->server_dev = NULL;
|
||||
|
||||
for (n = 0; n != CUSE_CMD_MAX; n++) {
|
||||
|
||||
pccmd = &pcc->cmds[n];
|
||||
|
||||
if (pccmd->entry.tqe_prev != NULL) {
|
||||
@ -1068,7 +1065,6 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd,
|
||||
|
||||
cuse_server_lock(pcs);
|
||||
while ((pccmd = cuse_server_find_command(pcs, curthread)) != NULL) {
|
||||
|
||||
/* send sync command */
|
||||
pccmd->entered = NULL;
|
||||
pccmd->error = *(int *)data;
|
||||
@ -1373,7 +1369,6 @@ cuse_client_free(void *arg)
|
||||
cuse_server_unlock(pcs);
|
||||
|
||||
for (n = 0; n != CUSE_CMD_MAX; n++) {
|
||||
|
||||
pccmd = &pcc->cmds[n];
|
||||
|
||||
sx_destroy(&pccmd->sx);
|
||||
@ -1434,7 +1429,6 @@ cuse_client_open(struct cdev *dev, int fflags, int devtype, struct thread *td)
|
||||
pcc->server = pcs;
|
||||
|
||||
for (n = 0; n != CUSE_CMD_MAX; n++) {
|
||||
|
||||
pccmd = &pcc->cmds[n];
|
||||
|
||||
pccmd->sub.dev = pcd;
|
||||
@ -1572,7 +1566,6 @@ cuse_client_read(struct cdev *dev, struct uio *uio, int ioflag)
|
||||
cuse_cmd_lock(pccmd);
|
||||
|
||||
while (uio->uio_resid != 0) {
|
||||
|
||||
if (uio->uio_iov->iov_len > CUSE_LENGTH_MAX) {
|
||||
error = ENOMEM;
|
||||
break;
|
||||
@ -1633,7 +1626,6 @@ cuse_client_write(struct cdev *dev, struct uio *uio, int ioflag)
|
||||
cuse_cmd_lock(pccmd);
|
||||
|
||||
while (uio->uio_resid != 0) {
|
||||
|
||||
if (uio->uio_iov->iov_len > CUSE_LENGTH_MAX) {
|
||||
error = ENOMEM;
|
||||
break;
|
||||
|
@ -58,7 +58,6 @@ struct cdev_priv_list cdevp_list = TAILQ_HEAD_INITIALIZER(cdevp_list);
|
||||
|
||||
struct unrhdr *devfs_inos;
|
||||
|
||||
|
||||
static MALLOC_DEFINE(M_DEVFS2, "DEVFS2", "DEVFS data 2");
|
||||
static MALLOC_DEFINE(M_DEVFS3, "DEVFS3", "DEVFS data 3");
|
||||
static MALLOC_DEFINE(M_CDEVP, "DEVFS1", "DEVFS cdev_priv storage");
|
||||
@ -523,7 +522,6 @@ devfs_populate_loop(struct devfs_mount *dm, int cleanup)
|
||||
sx_assert(&dm->dm_lock, SX_XLOCKED);
|
||||
dev_lock();
|
||||
TAILQ_FOREACH(cdp, &cdevp_list, cdp_list) {
|
||||
|
||||
KASSERT(cdp->cdp_dirents != NULL, ("NULL cdp_dirents"));
|
||||
|
||||
/*
|
||||
@ -575,7 +573,6 @@ devfs_populate_loop(struct devfs_mount *dm, int cleanup)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
cdp->cdp_inuse++;
|
||||
dev_unlock();
|
||||
|
||||
@ -604,7 +601,6 @@ devfs_populate_loop(struct devfs_mount *dm, int cleanup)
|
||||
(dd->de_flags & (DE_DOT | DE_DOTDOT)) == 0,
|
||||
("%s: invalid directory (si_name=%s)",
|
||||
__func__, cdp->cdp_c.si_name));
|
||||
|
||||
}
|
||||
de_flags = 0;
|
||||
de = devfs_find(dd, s, q - s, DT_LNK);
|
||||
|
@ -468,7 +468,6 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp)
|
||||
else
|
||||
memset(ip->i_data, 0, sizeof(ip->i_data));
|
||||
|
||||
|
||||
/*
|
||||
* Set up a new generation number for this inode.
|
||||
* Avoid zero values.
|
||||
@ -1301,7 +1300,6 @@ ext2_fix_bitmap_tail(unsigned char *bitmap, int first, int last)
|
||||
bitmap[i] = 0xff;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Determine whether an inode can be allocated.
|
||||
*
|
||||
|
@ -83,7 +83,6 @@ ext2_ext_balloc(struct inode *ip, uint32_t lbn, int size,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bp->b_blkno = fsbtodb(fs, newblk);
|
||||
if (flags & BA_CLRBUF)
|
||||
vfs_bio_clrbuf(bp);
|
||||
|
@ -236,7 +236,6 @@ ext2_bmaparray(struct vnode *vp, daddr_t bn, daddr_t *bnp, int *runp, int *runb)
|
||||
if (runb)
|
||||
*runb = 0;
|
||||
|
||||
|
||||
ap = a;
|
||||
nump = #
|
||||
error = ext2_getlbns(vp, bn, ap, nump);
|
||||
|
@ -140,4 +140,3 @@ struct ext2fs_dinode {
|
||||
};
|
||||
|
||||
#endif /* !_FS_EXT2FS_EXT2_DINODE_H_ */
|
||||
|
||||
|
@ -581,7 +581,6 @@ ext2_extattr_inode_delete(struct inode *ip, int attrnamespace, const char *name)
|
||||
if ((EXT2_IS_LAST_ENTRY(EXT2_EXTATTR_NEXT(entry))) &&
|
||||
(ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) ==
|
||||
attrnamespace)) {
|
||||
|
||||
name_len = entry->e_name_len;
|
||||
attr_name = ext2_extattr_name_to_bsd(entry->e_name_index,
|
||||
entry->e_name, &name_len);
|
||||
@ -715,7 +714,6 @@ ext2_extattr_block_delete(struct inode *ip, int attrnamespace, const char *name)
|
||||
if (EXT2_IS_LAST_ENTRY(EXT2_EXTATTR_NEXT(entry)) &&
|
||||
(ext2_extattr_attrnamespace_to_bsd(entry->e_name_index) ==
|
||||
attrnamespace)) {
|
||||
|
||||
name_len = entry->e_name_len;
|
||||
attr_name = ext2_extattr_name_to_bsd(entry->e_name_index,
|
||||
entry->e_name, &name_len);
|
||||
|
@ -53,7 +53,6 @@
|
||||
#define EXT2_EXTATTR_VALUE_HASH_SHIFT 16
|
||||
#define EXT2_EXTATTR_BLOCK_HASH_SHIFT 16
|
||||
|
||||
|
||||
struct ext2fs_extattr_header {
|
||||
int32_t h_magic; /* magic number for identification */
|
||||
int32_t h_refcount; /* reference count */
|
||||
|
@ -192,7 +192,6 @@ ext4_index_store_pblock(struct ext4_extent_index *index, e4fs_daddr_t pb)
|
||||
index->ei_leaf_hi = htole16((pb >> 32) & 0xffff);
|
||||
}
|
||||
|
||||
|
||||
static inline e4fs_daddr_t
|
||||
ext4_ext_extent_pblock(struct ext4_extent *extent)
|
||||
{
|
||||
|
@ -94,7 +94,6 @@ ext2_print_inode(struct inode *in)
|
||||
}
|
||||
#endif /* EXT2FS_PRINT_EXTENTS */
|
||||
|
||||
|
||||
#define XTIME_TO_NSEC(x) ((le32toh(x) & EXT3_NSEC_MASK) >> 2)
|
||||
|
||||
/*
|
||||
|
@ -944,7 +944,6 @@ ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp)
|
||||
int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize;
|
||||
int error;
|
||||
|
||||
|
||||
#ifdef INVARIANTS
|
||||
if ((cnp->cn_flags & SAVENAME) == 0)
|
||||
panic("ext2_direnter: missing name");
|
||||
|
@ -78,7 +78,6 @@ SDT_PROBE_DEFINE2(ext2fs, , vfsops, trace, "int", "char*");
|
||||
SDT_PROBE_DEFINE2(ext2fs, , vfsops, ext2_cg_validate_error, "char*", "int");
|
||||
SDT_PROBE_DEFINE1(ext2fs, , vfsops, ext2_compute_sb_data_error, "char*");
|
||||
|
||||
|
||||
static int ext2_flushfiles(struct mount *mp, int flags, struct thread *td);
|
||||
static int ext2_mountfs(struct vnode *, struct mount *);
|
||||
static int ext2_reload(struct mount *mp, struct thread *td);
|
||||
@ -398,7 +397,6 @@ ext2_cg_validate(struct m_ext2fs *fs)
|
||||
SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error,
|
||||
"block bitmap is zero", i);
|
||||
return (EINVAL);
|
||||
|
||||
}
|
||||
if (b_bitmap <= last_cg_block) {
|
||||
SDT_PROBE2(ext2fs, , vfsops, ext2_cg_validate_error,
|
||||
|
@ -1572,7 +1572,6 @@ ext2_strategy(struct vop_strategy_args *ap)
|
||||
if (vp->v_type == VBLK || vp->v_type == VCHR)
|
||||
panic("ext2_strategy: spec");
|
||||
if (bp->b_blkno == bp->b_lblkno) {
|
||||
|
||||
if (VTOI(ap->a_vp)->i_flag & IN_E4EXTENTS)
|
||||
error = ext4_bmapext(vp, bp->b_lblkno, &blkno, NULL, NULL);
|
||||
else
|
||||
|
@ -272,7 +272,6 @@ fdesc_get_ino_alloc(struct mount *mp, void *arg, int lkflags,
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* vp is the current namei directory
|
||||
* ndp is the name to locate in that directory...
|
||||
|
@ -366,4 +366,3 @@ fifo_advlock(ap)
|
||||
|
||||
return (ap->a_flags & F_FLOCK ? EOPNOTSUPP : EINVAL);
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,6 @@ fuse_internal_cache_attrs(struct vnode *vp, struct fuse_attr *attr,
|
||||
memcpy(vap, vp_cache_at, sizeof(*vap));
|
||||
}
|
||||
|
||||
|
||||
/* fsync */
|
||||
|
||||
int
|
||||
|
@ -199,7 +199,6 @@ fuse_validity_2_timespec(const struct fuse_entry_out *feo,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* VFS ops */
|
||||
int
|
||||
fuse_internal_get_cached_vnode(struct mount*, ino_t, int, struct vnode**);
|
||||
|
@ -1037,7 +1037,6 @@ fuse_io_strategy(struct vnode *vp, struct buf *bp)
|
||||
"Short read of a dirty file");
|
||||
uiop->uio_resid = 0;
|
||||
}
|
||||
|
||||
}
|
||||
if (error) {
|
||||
bp->b_ioflags |= BIO_ERROR;
|
||||
|
@ -285,7 +285,6 @@ fiov_adjust(struct fuse_iov *fiov, size_t size)
|
||||
(fuse_iov_permanent_bufsize >= 0 &&
|
||||
fiov->allocated_size - size > fuse_iov_permanent_bufsize &&
|
||||
--fiov->credit < 0)) {
|
||||
|
||||
fiov->base = realloc(fiov->base, FU_AT_LEAST(size), M_FUSEMSG,
|
||||
M_WAITOK | M_ZERO);
|
||||
if (!fiov->base) {
|
||||
|
@ -106,7 +106,7 @@
|
||||
|
||||
#ifndef _FUSE_FUSE_KERNEL_H
|
||||
#define _FUSE_FUSE_KERNEL_H
|
||||
|
||||
|
||||
#ifdef __linux__
|
||||
#include <linux/types.h>
|
||||
#else
|
||||
|
@ -440,7 +440,7 @@ out:
|
||||
vnode_pager_setsize(vp, newsize);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
/* Get the current, possibly dirty, size of the file */
|
||||
int
|
||||
fuse_vnode_size(struct vnode *vp, off_t *filesize, struct ucred *cred,
|
||||
@ -485,7 +485,7 @@ fuse_vnode_update(struct vnode *vp, int flags)
|
||||
fvdat->cached_attrs.va_mtime = ts;
|
||||
if (flags & FN_CTIMECHANGE)
|
||||
fvdat->cached_attrs.va_ctime = ts;
|
||||
|
||||
|
||||
fvdat->flag |= flags;
|
||||
}
|
||||
|
||||
|
@ -1232,7 +1232,6 @@ fuse_vnop_lookup(struct vop_lookup_args *ap)
|
||||
(nameiop == RENAME && wantparent))) {
|
||||
cnp->cn_flags |= SAVENAME;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
out:
|
||||
@ -1877,7 +1876,6 @@ fuse_vnop_strategy(struct vop_strategy_args *ap)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
struct vnop_symlink_args {
|
||||
struct vnode *a_dvp;
|
||||
@ -2120,7 +2118,7 @@ fuse_vnop_setextattr(struct vop_setextattr_args *ap)
|
||||
size_t len;
|
||||
char *attr_str;
|
||||
int err;
|
||||
|
||||
|
||||
if (fuse_isdeadfs(vp))
|
||||
return (ENXIO);
|
||||
|
||||
@ -2466,7 +2464,7 @@ fuse_vnop_print(struct vop_print_args *ap)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get an NFS filehandle for a FUSE file.
|
||||
*
|
||||
@ -2509,5 +2507,3 @@ fuse_vnop_vptofh(struct vop_vptofh_args *ap)
|
||||
return EOVERFLOW;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -338,7 +338,6 @@ unix2dosfn(const u_char *un, u_char dn[12], size_t unlen, u_int gen,
|
||||
if (i < 0)
|
||||
return 0;
|
||||
|
||||
|
||||
/*
|
||||
* Filenames with some characters are not allowed!
|
||||
*/
|
||||
|
@ -816,7 +816,6 @@ clusteralloc1(struct msdosfsmount *pmp, u_long start, u_long count,
|
||||
return (chainalloc(pmp, foundcn, foundl, fillwith, retcluster, got));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Free a chain of clusters.
|
||||
*
|
||||
|
@ -130,7 +130,6 @@ struct msdosfs_fileno {
|
||||
/* Byte offset in FAT on filesystem pmp, cluster cn */
|
||||
#define FATOFS(pmp, cn) ((cn) * (pmp)->pm_fatmult / (pmp)->pm_fatdiv)
|
||||
|
||||
|
||||
#define VFSTOMSDOSFS(mp) ((struct msdosfsmount *)mp->mnt_data)
|
||||
|
||||
/* Number of bits in one pm_inusemap item: */
|
||||
|
@ -579,7 +579,6 @@ struct uio; struct buf; struct vattr; struct nameidata; /* XXX */
|
||||
((e) != EINTR && (e) != ERESTART && (e) != EWOULDBLOCK && \
|
||||
((s) & PR_CONNREQUIRED) == 0)
|
||||
|
||||
|
||||
/*
|
||||
* This structure holds socket information for a connection. Used by the
|
||||
* client and the server for callbacks.
|
||||
|
@ -489,7 +489,6 @@ nfs_getauth(struct nfssockreq *nrp, int secflavour, char *clnt_principal,
|
||||
case AUTH_SYS:
|
||||
default:
|
||||
return (authunix_create(cred));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -734,7 +733,7 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
||||
if (dtrace_nfscl_nfs234_start_probe != NULL) {
|
||||
uint32_t probe_id;
|
||||
int probe_procnum;
|
||||
|
||||
|
||||
if (nd->nd_flag & ND_NFSV4) {
|
||||
probe_id =
|
||||
nfscl_nfs4_start_probes[nd->nd_procnum];
|
||||
@ -1257,13 +1256,13 @@ static int
|
||||
nfs_sig_pending(sigset_t set)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = 0 ; i < nitems(newnfs_sig_set); i++)
|
||||
if (SIGISMEMBER(set, newnfs_sig_set[i]))
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The set/restore sigmask functions are used to (temporarily) overwrite
|
||||
* the thread td_sigmask during an RPC call (for example). These are also
|
||||
@ -1275,7 +1274,7 @@ newnfs_set_sigmask(struct thread *td, sigset_t *oldset)
|
||||
sigset_t newset;
|
||||
int i;
|
||||
struct proc *p;
|
||||
|
||||
|
||||
SIGFILLSET(newset);
|
||||
if (td == NULL)
|
||||
td = curthread; /* XXX */
|
||||
@ -1337,7 +1336,7 @@ newnfs_sigintr(struct nfsmount *nmp, struct thread *td)
|
||||
{
|
||||
struct proc *p;
|
||||
sigset_t tmpset;
|
||||
|
||||
|
||||
/* Terminate all requests while attempting a forced unmount. */
|
||||
if (NFSCL_FORCEDISM(nmp->nm_mountp))
|
||||
return (EIO);
|
||||
@ -1420,7 +1419,7 @@ nfs_up(struct nfsmount *nmp, struct thread *td, const char *msg,
|
||||
VQ_NOTRESP, 1);
|
||||
} else
|
||||
mtx_unlock(&nmp->nm_mtx);
|
||||
|
||||
|
||||
mtx_lock(&nmp->nm_mtx);
|
||||
if ((flags & NFSSTA_LOCKTIMEO) && (nmp->nm_state & NFSSTA_LOCKTIMEO)) {
|
||||
nmp->nm_state &= ~NFSSTA_LOCKTIMEO;
|
||||
@ -1430,4 +1429,3 @@ nfs_up(struct nfsmount *nmp, struct thread *td, const char *msg,
|
||||
} else
|
||||
mtx_unlock(&nmp->nm_mtx);
|
||||
}
|
||||
|
||||
|
@ -420,7 +420,6 @@ newnfs_timer(void *arg)
|
||||
callout_reset(&newnfsd_callout, nfscl_ticks, newnfs_timer, NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sleep for a short period of time unless errval == NFSERR_GRACE, where
|
||||
* the sleep should be for 5 seconds.
|
||||
@ -952,4 +951,3 @@ DECLARE_MODULE(nfscommon, nfscommon_mod, SI_SUB_VFS, SI_ORDER_ANY);
|
||||
MODULE_VERSION(nfscommon, 1);
|
||||
MODULE_DEPEND(nfscommon, nfssvc, 1, 1, 1);
|
||||
MODULE_DEPEND(nfscommon, krpc, 1, 1, 1);
|
||||
|
||||
|
@ -364,7 +364,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp,
|
||||
mb->m_len = 0;
|
||||
nd->nd_mreq = nd->nd_mb = mb;
|
||||
nd->nd_bpos = mtod(mb, char *);
|
||||
|
||||
|
||||
/*
|
||||
* And fill the first file handle into the request.
|
||||
*/
|
||||
@ -2559,7 +2559,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
|
||||
xattrsupp = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Put out the attribute bitmap for the ones being filled in
|
||||
* and get the field for the number of attributes returned.
|
||||
@ -3272,7 +3272,7 @@ tryagain:
|
||||
len -= (nfsrv_dnsnamelen + 1);
|
||||
*(cp - 1) = '\0';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check for the special case of "nobody".
|
||||
*/
|
||||
@ -3281,7 +3281,7 @@ tryagain:
|
||||
error = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
hp = NFSUSERNAMEHASH(str, len);
|
||||
mtx_lock(&hp->mtx);
|
||||
TAILQ_FOREACH(usrp, &hp->lughead, lug_namehash) {
|
||||
@ -3484,7 +3484,7 @@ tryagain:
|
||||
len -= (nfsrv_dnsnamelen + 1);
|
||||
*(cp - 1) = '\0';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check for the special case of "nogroup".
|
||||
*/
|
||||
@ -3493,7 +3493,7 @@ tryagain:
|
||||
error = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
hp = NFSGROUPNAMEHASH(str, len);
|
||||
mtx_lock(&hp->mtx);
|
||||
TAILQ_FOREACH(usrp, &hp->lughead, lug_namehash) {
|
||||
|
@ -776,4 +776,3 @@ void nfsrvd_init(int);
|
||||
/* nfs_clkrpc.c */
|
||||
int nfscbd_addsock(struct file *);
|
||||
int nfscbd_nfsd(NFSPROC_T *, struct nfsd_nfscbd_args *);
|
||||
|
||||
|
@ -118,4 +118,3 @@ struct nfsexstuff {
|
||||
if (nfsd_debuglevel >= (level)) \
|
||||
printf(__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
#ifndef _NFS_NFSM_SUBS_H_
|
||||
#define _NFS_NFSM_SUBS_H_
|
||||
|
||||
|
||||
/*
|
||||
* These macros do strange and peculiar things to mbuf chains for
|
||||
* the assistance of the nfs code. To attempt to use them for any
|
||||
|
@ -1137,7 +1137,6 @@ struct nfsv3_sattr {
|
||||
NFSATTRBM_QUOTAUSED | \
|
||||
NFSATTRBM_FSLAYOUTTYPE)
|
||||
|
||||
|
||||
#ifdef QUOTA
|
||||
/*
|
||||
* If QUOTA OR in NFSATTRBIT_QUOTAHARD, NFSATTRBIT_QUOTASOFT and
|
||||
|
@ -199,7 +199,7 @@
|
||||
#define RPCMNT_NAMELEN 255
|
||||
#define RPCMNT_PATHLEN 1024
|
||||
#define RPCPROG_NFS 100003
|
||||
|
||||
|
||||
/* Structs for common parts of the rpc's */
|
||||
struct rpcv2_time {
|
||||
u_int32_t rpc_sec;
|
||||
|
@ -1890,4 +1890,3 @@ ncl_meta_setsize(struct vnode *vp, struct thread *td, u_quad_t nsize)
|
||||
}
|
||||
return(error);
|
||||
}
|
||||
|
||||
|
@ -485,4 +485,3 @@ nfscl_lockderef(struct nfsv4lock *lckp)
|
||||
}
|
||||
NFSUNLOCKCLSTATE();
|
||||
}
|
||||
|
||||
|
@ -540,7 +540,6 @@ dtnfsclient_load(void *dummy)
|
||||
(dtrace_nfsclient_nfs23_done_probe_func_t)dtrace_probe;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dtnfsclient_unload()
|
||||
{
|
||||
|
@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <rpc/rpcsec_gss.h>
|
||||
#include <rpc/rpcsec_tls.h>
|
||||
|
||||
|
||||
NFSDLOCKMUTEX;
|
||||
|
||||
extern SVCPOOL *nfscbd_pool;
|
||||
@ -308,4 +307,3 @@ nfsrvd_cbinit(int terminating)
|
||||
NFSD_LOCK();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp,
|
||||
}
|
||||
|
||||
vp->v_vflag |= VV_VMSIZEVNLOCK;
|
||||
|
||||
|
||||
np->n_fhp = malloc(sizeof (struct nfsfh) + fhsize,
|
||||
M_NFSFH, M_WAITOK);
|
||||
bcopy(fhp, np->n_fhp->nfh_fh, fhsize);
|
||||
|
@ -249,7 +249,7 @@ nfscl_nget(struct mount *mntp, struct vnode *dvp, struct nfsfh *nfhp,
|
||||
}
|
||||
|
||||
vp->v_vflag |= VV_VMSIZEVNLOCK;
|
||||
|
||||
|
||||
np->n_fhp = nfhp;
|
||||
/*
|
||||
* For NFSv4, we have to attach the directory file handle and
|
||||
@ -1046,7 +1046,6 @@ newnfs_copyincred(struct ucred *cr, struct nfscred *nfscr)
|
||||
nfscr->nfsc_groups[i] = cr->cr_groups[i];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Do any client specific initialization.
|
||||
*/
|
||||
@ -1419,4 +1418,3 @@ MODULE_VERSION(nfscl, 1);
|
||||
MODULE_DEPEND(nfscl, nfscommon, 1, 1, 1);
|
||||
MODULE_DEPEND(nfscl, krpc, 1, 1, 1);
|
||||
MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1);
|
||||
|
||||
|
@ -231,7 +231,7 @@ nfsrpc_null(vnode_t vp, struct ucred *cred, NFSPROC_T *p)
|
||||
{
|
||||
int error;
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
|
||||
|
||||
NFSCL_REQSTART(nd, NFSPROC_NULL, vp);
|
||||
error = nfscl_request(nd, vp, p, cred, NULL);
|
||||
if (nd->nd_repstat && !error)
|
||||
@ -1191,7 +1191,7 @@ nfsrpc_getattr(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
int error;
|
||||
nfsattrbit_t attrbits;
|
||||
|
||||
|
||||
NFSCL_REQSTART(nd, NFSPROC_GETATTR, vp);
|
||||
if (nd->nd_flag & ND_NFSV4) {
|
||||
NFSGETATTR_ATTRBIT(&attrbits);
|
||||
@ -1219,7 +1219,7 @@ nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred,
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
int error, vers = NFS_VER2;
|
||||
nfsattrbit_t attrbits;
|
||||
|
||||
|
||||
nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL, 0, 0);
|
||||
if (nd->nd_flag & ND_NFSV4) {
|
||||
vers = NFS_VER4;
|
||||
@ -1837,7 +1837,6 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode,
|
||||
x = txdr_unsigned(len);
|
||||
*tl++ = x; /* total to this offset */
|
||||
*tl = x; /* size of this write */
|
||||
|
||||
}
|
||||
nfsm_uiombuf(nd, uiop, len);
|
||||
/*
|
||||
@ -2497,7 +2496,7 @@ nfsrpc_rename(vnode_t fdvp, vnode_t fvp, char *fnameptr, int fnamelen,
|
||||
nfsattrbit_t attrbits;
|
||||
nfsv4stateid_t fdstateid, tdstateid;
|
||||
int error = 0, ret = 0, gottd = 0, gotfd = 0, i;
|
||||
|
||||
|
||||
*fattrflagp = 0;
|
||||
*tattrflagp = 0;
|
||||
nmp = VFSTONFS(fdvp->v_mount);
|
||||
@ -3086,7 +3085,6 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
|
||||
reqsize = 5 * NFSX_UNSIGNED;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Loop around doing readdir rpc's of size readsize.
|
||||
* The stopping criteria is EOF or buffer full.
|
||||
@ -3146,7 +3144,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
|
||||
more_dirs = fxdr_unsigned(int, *tl);
|
||||
if (!more_dirs)
|
||||
tryformoredirs = 0;
|
||||
|
||||
|
||||
/* loop through the dir entries, doctoring them to 4bsd form */
|
||||
while (more_dirs && bigenough) {
|
||||
if (nd->nd_flag & ND_NFSV4) {
|
||||
@ -3579,7 +3577,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep,
|
||||
more_dirs = fxdr_unsigned(int, *tl);
|
||||
if (!more_dirs)
|
||||
tryformoredirs = 0;
|
||||
|
||||
|
||||
/* loop through the dir entries, doctoring them to 4bsd form */
|
||||
while (more_dirs && bigenough) {
|
||||
NFSM_DISSECT(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
|
||||
@ -3869,7 +3867,7 @@ nfsrpc_commit(vnode_t vp, u_quad_t offset, int cnt, struct ucred *cred,
|
||||
nfsattrbit_t attrbits;
|
||||
int error;
|
||||
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
|
||||
|
||||
|
||||
*attrflagp = 0;
|
||||
NFSCL_REQSTART(nd, NFSPROC_COMMIT, vp);
|
||||
NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
|
||||
@ -4674,7 +4672,7 @@ nfsrpc_getacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
|
||||
int error;
|
||||
nfsattrbit_t attrbits;
|
||||
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
|
||||
|
||||
|
||||
if (nfsrv_useacl == 0 || !NFSHASNFSV4(nmp))
|
||||
return (EOPNOTSUPP);
|
||||
NFSCL_REQSTART(nd, NFSPROC_GETACL, vp);
|
||||
@ -4702,7 +4700,7 @@ nfsrpc_setacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
|
||||
{
|
||||
int error;
|
||||
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
|
||||
|
||||
|
||||
if (nfsrv_useacl == 0 || !NFSHASNFSV4(nmp))
|
||||
return (EOPNOTSUPP);
|
||||
error = nfsrpc_setattr(vp, NULL, aclp, cred, p, NULL, NULL, stuff);
|
||||
@ -4720,7 +4718,7 @@ nfsrpc_setaclrpc(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
|
||||
int error;
|
||||
nfsattrbit_t attrbits;
|
||||
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
|
||||
|
||||
|
||||
if (!NFSHASNFSV4(nmp))
|
||||
return (EOPNOTSUPP);
|
||||
NFSCL_REQSTART(nd, NFSPROC_SETACL, vp);
|
||||
@ -5121,7 +5119,7 @@ nfsrpc_getdeviceinfo(struct nfsmount *nmp, uint8_t *deviceid, int layouttype,
|
||||
error = NFSERR_BADXDR;
|
||||
goto nfsmout;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Now we know how many stripe indices and addresses, so
|
||||
* we can allocate the structure the correct size.
|
||||
@ -6711,7 +6709,6 @@ nfscl_getsameserver(struct nfsmount *nmp, struct nfsclds *newdsp,
|
||||
*retdspp = dsp;
|
||||
return (NFSDSP_USETHISSESSION);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (fndseq != 0)
|
||||
@ -6733,7 +6730,7 @@ nfsrpc_commitds(vnode_t vp, uint64_t offset, int cnt, struct nfsclds *dsp,
|
||||
struct nfssockreq *nrp;
|
||||
struct nfsvattr na;
|
||||
int attrflag, error;
|
||||
|
||||
|
||||
nd->nd_mrep = NULL;
|
||||
if (vers == 0 || vers == NFS_VER4) {
|
||||
nfscl_reqstart(nd, NFSPROC_COMMITDS, nmp, fhp->nfh_fh,
|
||||
@ -6842,7 +6839,7 @@ nfsrpc_advise(vnode_t vp, off_t offset, uint64_t cnt, int advise,
|
||||
struct nfsrv_descript nfsd, *nd = &nfsd;
|
||||
nfsattrbit_t hints;
|
||||
int error;
|
||||
|
||||
|
||||
NFSZERO_ATTRBIT(&hints);
|
||||
if (advise == POSIX_FADV_WILLNEED)
|
||||
NFSSETBIT_ATTRBIT(&hints, NFSV4IOHINT_WILLNEED);
|
||||
@ -6881,7 +6878,7 @@ nfsrpc_adviseds(vnode_t vp, uint64_t offset, int cnt, int advise,
|
||||
struct nfssockreq *nrp;
|
||||
nfsattrbit_t hints;
|
||||
int error;
|
||||
|
||||
|
||||
/* For NFS DSs prior to NFSv4.2, just return OK. */
|
||||
if (vers == NFS_VER3 || minorversion < NFSV42_MINORVERSION)
|
||||
return (0);
|
||||
@ -7922,7 +7919,7 @@ nfsrpc_createlayout(vnode_t dvp, char *name, int namelen, struct vattr *vap,
|
||||
goto nfsmout;
|
||||
op->nfso_stateid = stateid;
|
||||
newnfs_copyincred(cred, &op->nfso_cred);
|
||||
|
||||
|
||||
nfscl_openrelease(nmp, op, error, newone);
|
||||
*unlockedp = 1;
|
||||
|
||||
|
@ -1917,7 +1917,7 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p)
|
||||
if (clp != NULL) {
|
||||
if ((clp->nfsc_flags & NFSCLFLAGS_INITED) == 0)
|
||||
panic("nfscl umount");
|
||||
|
||||
|
||||
/*
|
||||
* First, handshake with the nfscl renew thread, to terminate
|
||||
* it.
|
||||
@ -1926,7 +1926,7 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p)
|
||||
while (clp->nfsc_flags & NFSCLFLAGS_HASTHREAD)
|
||||
(void)mtx_sleep(clp, NFSCLSTATEMUTEXPTR, PWAIT,
|
||||
"nfsclumnt", hz);
|
||||
|
||||
|
||||
/*
|
||||
* Now, get the exclusive lock on the client state, so
|
||||
* that no uses of the state are still in progress.
|
||||
@ -1936,7 +1936,7 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p)
|
||||
NFSCLSTATEMUTEXPTR, NULL);
|
||||
} while (!igotlock);
|
||||
NFSUNLOCKCLSTATE();
|
||||
|
||||
|
||||
/*
|
||||
* Free up all the state. It will expire on the server, but
|
||||
* maybe we should do a SetClientId/SetClientIdConfirm so
|
||||
@ -5479,4 +5479,3 @@ tryagain:
|
||||
NFSUNLOCKCLSTATE();
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ ncl_getattrcache(struct vnode *vp, struct vattr *vaper)
|
||||
int timeo, mustflush;
|
||||
u_quad_t nsize;
|
||||
bool setnsize;
|
||||
|
||||
|
||||
np = VTONFS(vp);
|
||||
vap = &np->n_vattr.na_vattr;
|
||||
nmp = VFSTONFS(vp->v_mount);
|
||||
@ -273,7 +273,7 @@ ncl_getcookie(struct nfsnode *np, off_t off, int add)
|
||||
struct nfsdmap *dp, *dp2;
|
||||
int pos;
|
||||
nfsuint64 *retval = NULL;
|
||||
|
||||
|
||||
pos = (uoff_t)off / NFS_DIRBLKSIZ;
|
||||
if (pos == 0 || off < 0) {
|
||||
KASSERT(!add, ("nfs getcookie add at <= 0"));
|
||||
@ -388,4 +388,3 @@ ncl_init(struct vfsconf *vfsp)
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
|
||||
#include "opt_bootp.h"
|
||||
#include "opt_nfsroot.h"
|
||||
#include "opt_kern_tls.h"
|
||||
@ -180,7 +179,6 @@ SYSCTL_OPAQUE(_vfs_nfs, OID_AUTO, diskless_rootaddr, CTLFLAG_RD,
|
||||
&nfsv3_diskless.root_saddr, sizeof(nfsv3_diskless.root_saddr),
|
||||
"%Ssockaddr_in", "Diskless root nfs address");
|
||||
|
||||
|
||||
void newnfsargs_ntoh(struct nfs_args *);
|
||||
static int nfs_mountdiskless(char *,
|
||||
struct sockaddr_in *, struct nfs_args *,
|
||||
@ -368,7 +366,7 @@ ncl_fsinfo(struct nfsmount *nmp, struct vnode *vp, struct ucred *cred,
|
||||
struct nfsfsinfo fs;
|
||||
struct nfsvattr nfsva;
|
||||
int error, attrflag;
|
||||
|
||||
|
||||
error = nfsrpc_fsinfo(vp, &fs, cred, td, &nfsva, &attrflag, NULL);
|
||||
if (!error) {
|
||||
if (attrflag)
|
||||
@ -1358,7 +1356,6 @@ out:
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* VFS Operations.
|
||||
*
|
||||
@ -1551,7 +1548,6 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
|
||||
else
|
||||
nmp->nm_sockreq.nr_vers = NFS_VER2;
|
||||
|
||||
|
||||
if ((error = newnfs_connect(nmp, &nmp->nm_sockreq, cred, td, 0, false)))
|
||||
goto bad;
|
||||
/* For NFSv4.1, get the clientid now. */
|
||||
@ -1602,7 +1598,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
|
||||
if (error)
|
||||
goto bad;
|
||||
*vpp = NFSTOV(np);
|
||||
|
||||
|
||||
/*
|
||||
* Get file attributes and transfer parameters for the
|
||||
* mountpoint. This has the side effect of filling in
|
||||
@ -1645,7 +1641,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
|
||||
}
|
||||
if (argp->flags & NFSMNT_NFSV3)
|
||||
ncl_fsinfo(nmp, *vpp, cred, td);
|
||||
|
||||
|
||||
/* Mark if the mount point supports NFSv4 ACLs. */
|
||||
if ((argp->flags & NFSMNT_NFSV4) != 0 && nfsrv_useacl != 0 &&
|
||||
ret == 0 &&
|
||||
@ -1654,7 +1650,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam,
|
||||
mp->mnt_flag |= MNT_NFS4ACLS;
|
||||
MNT_IUNLOCK(mp);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Lose the lock but keep the ref.
|
||||
*/
|
||||
@ -2085,4 +2081,3 @@ void nfscl_retopts(struct nfsmount *nmp, char *buffer, size_t buflen)
|
||||
nfscl_printoptval(nmp, nmp->nm_timeo, ",timeout", &buf, &blen);
|
||||
nfscl_printoptval(nmp, nmp->nm_retry, ",retrans", &buf, &blen);
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,6 @@ nfs_access(struct vop_access_args *ap)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nfs open vnode op
|
||||
* Check to see if the type is ok
|
||||
@ -1177,7 +1176,7 @@ nfs_lookup(struct vop_lookup_args *ap)
|
||||
struct nfsvattr dnfsva, nfsva;
|
||||
struct vattr vattr;
|
||||
struct timespec nctime;
|
||||
|
||||
|
||||
*vpp = NULLVP;
|
||||
if ((flags & ISLASTCN) && (mp->mnt_flag & MNT_RDONLY) &&
|
||||
(cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME))
|
||||
@ -2341,7 +2340,7 @@ nfs_readdir(struct vop_readdir_args *ap)
|
||||
ssize_t tresid, left;
|
||||
int error = 0;
|
||||
struct vattr vattr;
|
||||
|
||||
|
||||
if (ap->a_eofflag != NULL)
|
||||
*ap->a_eofflag = 0;
|
||||
if (vp->v_type != VDIR)
|
||||
@ -2388,7 +2387,7 @@ nfs_readdir(struct vop_readdir_args *ap)
|
||||
if (ap->a_eofflag != NULL)
|
||||
*ap->a_eofflag = 1;
|
||||
}
|
||||
|
||||
|
||||
/* Add the partial DIRBLKSIZ (left) back in. */
|
||||
uio->uio_resid += left;
|
||||
return (error);
|
||||
@ -3148,7 +3147,7 @@ nfs_advlock(struct vop_advlock_args *ap)
|
||||
struct vattr va;
|
||||
int ret, error;
|
||||
u_quad_t size;
|
||||
|
||||
|
||||
error = NFSVOPLOCK(vp, LK_SHARED);
|
||||
if (error != 0)
|
||||
return (EBADF);
|
||||
@ -3277,7 +3276,7 @@ nfs_advlockasync(struct vop_advlockasync_args *ap)
|
||||
struct vnode *vp = ap->a_vp;
|
||||
u_quad_t size;
|
||||
int error;
|
||||
|
||||
|
||||
if (NFS_ISV4(vp))
|
||||
return (EOPNOTSUPP);
|
||||
error = NFSVOPLOCK(vp, LK_SHARED);
|
||||
@ -4292,4 +4291,3 @@ nfs_pathconf(struct vop_pathconf_args *ap)
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ extern uint32_t nfscl_attrcache_load_done_id;
|
||||
nfscl_accesscache_get_hit_id, (vp), (uid), \
|
||||
(mode)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define KDTRACE_NFS_ACCESSCACHE_GET_MISS(vp, uid, mode) do { \
|
||||
if (dtrace_nfscl_accesscache_get_miss_probe != NULL) \
|
||||
(dtrace_nfscl_accesscache_get_miss_probe)( \
|
||||
|
@ -298,7 +298,6 @@ fhanew_set_locktype(rpcproc_t procnum, struct fha_info *info)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This just specifies that offsets should obey affinity when within
|
||||
* the same 1Mbyte (1<<20) chunk for the file (reads only for now).
|
||||
|
@ -1034,4 +1034,3 @@ static void
|
||||
nfsrc_marksametcpconn(u_int64_t sockref)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,6 @@ int newnfs_nfsv3_procid[NFS_V3NPROCS] = {
|
||||
NFSPROC_NOOP,
|
||||
};
|
||||
|
||||
|
||||
SYSCTL_DECL(_vfs_nfsd);
|
||||
|
||||
SVCPOOL *nfsrvd_pool;
|
||||
@ -536,12 +535,12 @@ nfsrvd_nfsd(struct thread *td, struct nfsd_nfsd_args *args)
|
||||
ret4 = rpc_gss_set_svc_name_call(principal,
|
||||
"kerberosv5", GSS_C_INDEFINITE, NFS_PROG,
|
||||
NFS_VER4);
|
||||
|
||||
|
||||
if (!ret2 || !ret3 || !ret4)
|
||||
printf(
|
||||
"nfsd: can't register svc name\n");
|
||||
}
|
||||
|
||||
|
||||
nfsrvd_pool->sp_minthreads = args->minthreads;
|
||||
nfsrvd_pool->sp_maxthreads = args->maxthreads;
|
||||
|
||||
@ -555,7 +554,7 @@ nfsrvd_nfsd(struct thread *td, struct nfsd_nfsd_args *args)
|
||||
}
|
||||
|
||||
svc_run(nfsrvd_pool);
|
||||
|
||||
|
||||
/* Reset Getattr to not do a vn_start_write(). */
|
||||
nfsrv_writerpc[NFSPROC_GETATTR] = 0;
|
||||
nfsv4_opflag[NFSV4OP_GETATTR].modifyfs = 0;
|
||||
@ -610,4 +609,3 @@ nfsrvd_init(int terminating)
|
||||
NFSD_LOCK();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,6 @@ static struct nfsheur {
|
||||
int nh_seqcount; /* heuristic */
|
||||
} nfsheur[NUM_HEURISTIC];
|
||||
|
||||
|
||||
/*
|
||||
* Heuristic to detect sequential operation.
|
||||
*/
|
||||
@ -1053,7 +1052,6 @@ nfsvno_write(struct vnode *vp, off_t off, int retlen, int *stable,
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
if (*stable == NFSWRITE_UNSTABLE)
|
||||
ioflags = IO_NODELOCKED;
|
||||
else
|
||||
@ -2510,7 +2508,7 @@ again:
|
||||
bpos1 = nd->nd_bpos;
|
||||
bextpg1 = nd->nd_bextpg;
|
||||
bextpgsiz1 = nd->nd_bextpgsiz;
|
||||
|
||||
|
||||
/*
|
||||
* For readdir_and_lookup get the vnode using
|
||||
* the file number.
|
||||
@ -5157,7 +5155,7 @@ nfsrv_readdsrpc(fhandle_t *fhp, off_t off, int len, struct ucred *cred,
|
||||
error = ENOENT;
|
||||
goto nfsmout;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Now, adjust first mbuf so that any XDR before the
|
||||
* read data is skipped over.
|
||||
@ -5167,7 +5165,7 @@ nfsrv_readdsrpc(fhandle_t *fhp, off_t off, int len, struct ucred *cred,
|
||||
m->m_len -= trimlen;
|
||||
NFSM_DATAP(m, trimlen);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Truncate the mbuf chain at retlen bytes of data,
|
||||
* plus XDR padding that brings the length up to a
|
||||
@ -5927,7 +5925,7 @@ nfsrv_getattrdsrpc(fhandle_t *fhp, struct ucred *cred, NFSPROC_T *p,
|
||||
struct nfsrv_descript *nd;
|
||||
int error;
|
||||
nfsattrbit_t attrbits;
|
||||
|
||||
|
||||
NFSD_DEBUG(4, "in nfsrv_getattrdsrpc\n");
|
||||
nd = malloc(sizeof(*nd), M_TEMP, M_WAITOK | M_ZERO);
|
||||
nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, (u_int8_t *)fhp,
|
||||
@ -5985,7 +5983,7 @@ nfsrv_seekdsrpc(fhandle_t *fhp, off_t *offp, int content, bool *eofp,
|
||||
struct nfsrv_descript *nd;
|
||||
nfsv4stateid_t st;
|
||||
int error;
|
||||
|
||||
|
||||
NFSD_DEBUG(4, "in nfsrv_seekdsrpc\n");
|
||||
/*
|
||||
* Use a stateid where other is an alternating 01010 pattern and
|
||||
@ -6712,4 +6710,3 @@ MODULE_DEPEND(nfsd, nfscommon, 1, 1, 1);
|
||||
MODULE_DEPEND(nfsd, nfslockd, 1, 1, 1);
|
||||
MODULE_DEPEND(nfsd, krpc, 1, 1, 1);
|
||||
MODULE_DEPEND(nfsd, nfssvc, 1, 1, 1);
|
||||
|
||||
|
@ -255,7 +255,7 @@ nfsrvd_getattr(struct nfsrv_descript *nd, int isdgram,
|
||||
if (nd->nd_repstat == 0) {
|
||||
accmode = 0;
|
||||
NFSSET_ATTRBIT(&tmpbits, &attrbits);
|
||||
|
||||
|
||||
/*
|
||||
* GETATTR with write-only attr time_access_set and time_modify_set
|
||||
* should return NFS4ERR_INVAL.
|
||||
@ -5928,4 +5928,3 @@ nfsrvd_notsupp(struct nfsrv_descript *nd, __unused int isdgram,
|
||||
NFSEXITCODE2(0, nd);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -425,7 +425,6 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, server_max_minorversion4, CTLFLAG_RWTUN,
|
||||
static void nfsrvd_compound(struct nfsrv_descript *nd, int isdgram,
|
||||
u_char *tag, int taglen, u_int32_t minorvers);
|
||||
|
||||
|
||||
/*
|
||||
* This static array indicates which server procedures require the extra
|
||||
* arguments to return the current file handle for V2, 3.
|
||||
|
@ -4470,7 +4470,7 @@ nfsrv_docallback(struct nfsclient *clp, int procnum, nfsv4stateid_t *stateidp,
|
||||
m->m_len = 0;
|
||||
nd->nd_mreq = nd->nd_mb = m;
|
||||
nd->nd_bpos = mtod(m, caddr_t);
|
||||
|
||||
|
||||
/*
|
||||
* and build the callback request.
|
||||
*/
|
||||
@ -7958,7 +7958,6 @@ nfsrv_allocdevid(struct nfsdevice *ds, char *addr, char *dnshost)
|
||||
NFSBCOPY(dnshost, ds->nfsdev_host, ds->nfsdev_hostnamelen + 1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Create the device id list.
|
||||
* Return 0 if the nfsd threads are to run and ENXIO if the "-p" argument
|
||||
@ -8571,7 +8570,7 @@ nfsrv_mdscopymr(char *mdspathp, char *dspathp, char *curdspathp, char *buf,
|
||||
return (ENXIO);
|
||||
}
|
||||
curnmp = VFSTONFS(nd.ni_vp->v_mount);
|
||||
|
||||
|
||||
/* Search the nfsdev list for a match. */
|
||||
NFSDDSLOCK();
|
||||
*fdsp = nfsv4_findmirror(curnmp);
|
||||
@ -8619,7 +8618,7 @@ nfsrv_mdscopymr(char *mdspathp, char *dspathp, char *curdspathp, char *buf,
|
||||
return (ENXIO);
|
||||
}
|
||||
nmp = VFSTONFS(nd.ni_vp->v_mount);
|
||||
|
||||
|
||||
/*
|
||||
* Search the nfsdevice list for a match. If curnmp == NULL,
|
||||
* this is a recovery and there must be a mirror.
|
||||
@ -8751,4 +8750,3 @@ nfsrv_findmirroredds(struct nfsmount *nmp)
|
||||
}
|
||||
return (fndds);
|
||||
}
|
||||
|
||||
|
@ -2180,4 +2180,3 @@ nfsmout:
|
||||
}
|
||||
*taglenp = taglen;
|
||||
}
|
||||
|
||||
|
@ -272,7 +272,6 @@ null_bypass(struct vop_generic_args *ap)
|
||||
if (reles & VDESC_VP0_WILLRELE)
|
||||
VREF(*this_vp_p);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -100,7 +100,6 @@ procfs_docurproc(PFS_FILL_ARGS)
|
||||
|
||||
static int
|
||||
procfs_attr(PFS_ATTR_ARGS, int mode) {
|
||||
|
||||
vap->va_mode = mode;
|
||||
if (p != NULL) {
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
@ -61,7 +61,6 @@
|
||||
#include <fs/pseudofs/pseudofs.h>
|
||||
#include <fs/procfs/procfs.h>
|
||||
|
||||
|
||||
int
|
||||
procfs_doprocrlimit(PFS_FILL_ARGS)
|
||||
{
|
||||
@ -77,7 +76,6 @@ procfs_doprocrlimit(PFS_FILL_ARGS)
|
||||
PROC_UNLOCK(p);
|
||||
|
||||
for (i = 0; i < RLIM_NLIMITS; i++) {
|
||||
|
||||
/*
|
||||
* Add the rlimit ident
|
||||
*/
|
||||
|
@ -44,7 +44,6 @@
|
||||
|
||||
#define SMBFS_MAXPATHCOMP 256 /* maximum number of path components */
|
||||
|
||||
|
||||
/* Layout of the mount control block for an smb file system. */
|
||||
struct smbfs_args {
|
||||
int version;
|
||||
|
@ -70,7 +70,6 @@ static int smbfs_fastlookup = 1;
|
||||
SYSCTL_DECL(_vfs_smbfs);
|
||||
SYSCTL_INT(_vfs_smbfs, OID_AUTO, fastlookup, CTLFLAG_RW, &smbfs_fastlookup, 0, "");
|
||||
|
||||
|
||||
#define DE_SIZE (sizeof(struct dirent))
|
||||
|
||||
static int
|
||||
@ -286,7 +285,7 @@ smbfs_writevnode(struct vnode *vp, struct uio *uiop,
|
||||
|
||||
if (vn_rlimit_fsize(vp, uiop, td))
|
||||
return (EFBIG);
|
||||
|
||||
|
||||
scred = smbfs_malloc_scred();
|
||||
smb_makescred(scred, td, cred);
|
||||
error = smb_write(smp->sm_share, np->n_fid, uiop, scred);
|
||||
|
@ -266,14 +266,14 @@ smbfs_reclaim(ap)
|
||||
struct vnode *dvp;
|
||||
struct smbnode *np = VTOSMB(vp);
|
||||
struct smbmount *smp = VTOSMBFS(vp);
|
||||
|
||||
|
||||
SMBVDEBUG("%s,%d\n", np->n_name, vrefcnt(vp));
|
||||
|
||||
KASSERT((np->n_flag & NOPEN) == 0, ("file not closed before reclaim"));
|
||||
|
||||
dvp = (np->n_parent && (np->n_flag & NREFPARENT)) ?
|
||||
np->n_parent : NULL;
|
||||
|
||||
|
||||
/*
|
||||
* Remove the vnode from its hash chain.
|
||||
*/
|
||||
|
@ -177,7 +177,6 @@ smbfs_query_info_fs(struct smb_share *ssp, struct statfs *sbp,
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
smbfs_query_info_alloc(struct smb_share *ssp, struct statfs *sbp,
|
||||
struct smb_cred *scred)
|
||||
@ -669,7 +668,6 @@ smbfs_smb_setfattrNT(struct smbnode *np, u_int16_t attr, struct timespec *mtime,
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
smbfs_smb_open(struct smbnode *np, int accmode, struct smb_cred *scred)
|
||||
{
|
||||
@ -721,7 +719,6 @@ smbfs_smb_open(struct smbnode *np, int accmode, struct smb_cred *scred)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
smbfs_smb_close(struct smb_share *ssp, u_int16_t fid, struct timespec *mtime,
|
||||
struct smb_cred *scred)
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include <sys/module.h>
|
||||
#include <sys/sx.h>
|
||||
|
||||
|
||||
#include <netsmb/smb.h>
|
||||
#include <netsmb/smb_conn.h>
|
||||
#include <netsmb/smb_subr.h>
|
||||
@ -82,7 +81,6 @@ static struct vfsops smbfs_vfsops = {
|
||||
.vfs_unmount = smbfs_unmount,
|
||||
};
|
||||
|
||||
|
||||
VFS_SET(smbfs_vfsops, smbfs, VFCF_NETWORK);
|
||||
|
||||
MODULE_DEPEND(smbfs, netsmb, NSMB_VERSION, NSMB_VERSION, NSMB_VERSION);
|
||||
@ -155,7 +153,7 @@ smbfs_mount(struct mount *mp)
|
||||
|
||||
scred = smbfs_malloc_scred();
|
||||
smb_makescred(scred, td, td->td_ucred);
|
||||
|
||||
|
||||
/* Ask userspace of `fd`, the file descriptor of this session */
|
||||
if (1 != vfs_scanopt(mp->mnt_optnew, "fd", "%d", &v)) {
|
||||
vfs_mount_error(mp, "No fd option");
|
||||
@ -401,7 +399,7 @@ smbfs_statfs(struct mount *mp, struct statfs *sbp)
|
||||
vfs_mount_error(mp, "np == NULL");
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
|
||||
sbp->f_iosize = SSTOVC(ssp)->vc_txmax; /* optimal transfer block size */
|
||||
scred = smbfs_malloc_scred();
|
||||
smb_makescred(scred, td, td->td_ucred);
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
||||
|
||||
#include <netsmb/smb.h>
|
||||
#include <netsmb/smb_conn.h>
|
||||
#include <netsmb/smb_subr.h>
|
||||
@ -553,7 +552,6 @@ smbfs_create(ap)
|
||||
char *name = cnp->cn_nameptr;
|
||||
int nmlen = cnp->cn_namelen;
|
||||
int error;
|
||||
|
||||
|
||||
SMBVDEBUG("\n");
|
||||
*vpp = NULL;
|
||||
@ -563,7 +561,7 @@ smbfs_create(ap)
|
||||
return error;
|
||||
scred = smbfs_malloc_scred();
|
||||
smb_makescred(scred, cnp->cn_thread, cnp->cn_cred);
|
||||
|
||||
|
||||
error = smbfs_smb_create(dnp, name, nmlen, scred);
|
||||
if (error)
|
||||
goto out;
|
||||
@ -898,7 +896,7 @@ smbfs_pathconf (ap)
|
||||
struct smb_vc *vcp = SSTOVC(smp->sm_share);
|
||||
long *retval = ap->a_retval;
|
||||
int error = 0;
|
||||
|
||||
|
||||
switch (ap->a_name) {
|
||||
case _PC_FILESIZEBITS:
|
||||
if (vcp->vc_sopt.sv_caps & (SMB_CAP_LARGE_READX |
|
||||
@ -1039,7 +1037,6 @@ smbfs_advlock(ap)
|
||||
}
|
||||
size = np->n_size;
|
||||
switch (fl->l_whence) {
|
||||
|
||||
case SEEK_SET:
|
||||
case SEEK_CUR:
|
||||
start = fl->l_start;
|
||||
@ -1188,7 +1185,7 @@ smbfs_lookup(ap)
|
||||
int nmlen = cnp->cn_namelen;
|
||||
int error, islastcn, isdot;
|
||||
int killit;
|
||||
|
||||
|
||||
SMBVDEBUG("\n");
|
||||
if (dvp->v_type != VDIR)
|
||||
return ENOTDIR;
|
||||
|
@ -663,7 +663,7 @@ loop:
|
||||
goto loop;
|
||||
} else
|
||||
node->tn_vpstate |= TMPFS_VNODE_ALLOCATING;
|
||||
|
||||
|
||||
TMPFS_NODE_UNLOCK(node);
|
||||
|
||||
/* Get a new vnode and associate it with our node. */
|
||||
|
@ -1244,7 +1244,6 @@ tmpfs_rmdir(struct vop_rmdir_args *v)
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
/* Detach the directory entry from the directory (dnode). */
|
||||
tmpfs_dir_detach(dvp, de);
|
||||
if (v->a_cnp->cn_flags & DOWHITEOUT)
|
||||
|
@ -446,7 +446,6 @@ udf_mountfs(struct vnode *devvp, struct mount *mp)
|
||||
goto bail;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Grab the Fileset Descriptor
|
||||
* Thanks to Chuck McCrobie <mccrobie@cablespeed.com> for pointing
|
||||
@ -673,7 +672,7 @@ udf_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
|
||||
}
|
||||
|
||||
bcopy(bp->b_data, unode->fentry, size);
|
||||
|
||||
|
||||
brelse(bp);
|
||||
bp = NULL;
|
||||
|
||||
|
@ -690,7 +690,6 @@ udf_getfid(struct udf_dirstream *ds)
|
||||
*/
|
||||
if (ds->off + UDF_FID_SIZE > ds->size ||
|
||||
ds->off + le16toh(fid->l_iu) + fid->l_fi + UDF_FID_SIZE > ds->size){
|
||||
|
||||
/* Copy what we have of the fid into a buffer */
|
||||
frag_size = ds->size - ds->off;
|
||||
if (frag_size >= ds->udfmp->bsize) {
|
||||
@ -824,7 +823,6 @@ udf_readdir(struct vop_readdir_args *a)
|
||||
node->udfmp);
|
||||
|
||||
while ((fid = udf_getfid(ds)) != NULL) {
|
||||
|
||||
/* XXX Should we return an error on a bad fid? */
|
||||
if (udf_checktag(&fid->tag, TAGID_FID)) {
|
||||
printf("Invalid FID tag\n");
|
||||
@ -1163,7 +1161,6 @@ lookloop:
|
||||
ds = udf_opendir(node, offset, fsize, udfmp);
|
||||
|
||||
while ((fid = udf_getfid(ds)) != NULL) {
|
||||
|
||||
/* XXX Should we return an error on a bad fid? */
|
||||
if (udf_checktag(&fid->tag, TAGID_FID)) {
|
||||
printf("udf_lookup: Invalid tag\n");
|
||||
|
@ -416,7 +416,6 @@ unionfs_statfs(struct mount *mp, struct statfs *sbp)
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The FS type etc is copy from upper vfs.
|
||||
* (write able vfs have priority)
|
||||
|
Loading…
x
Reference in New Issue
Block a user