smbfs_vfsops.c (110501) | smbfs_vfsops.c (110533) |
---|---|
1/* 2 * Copyright (c) 2000-2001, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 2000-2001, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/fs/smbfs/smbfs_vfsops.c 110501 2003-02-07 14:34:29Z tjr $ | 32 * $FreeBSD: head/sys/fs/smbfs/smbfs_vfsops.c 110533 2003-02-08 05:48:04Z tjr $ |
33 */ 34#include "opt_netsmb.h" 35#ifndef NETSMB 36#error "SMBFS requires option NETSMB" 37#endif 38 39#include <sys/param.h> 40#include <sys/systm.h> --- 33 unchanged lines hidden (view full) --- 74SYSCTL_INT(_vfs_smbfs, OID_AUTO, version, CTLFLAG_RD, &smbfs_version, 0, ""); 75SYSCTL_INT(_vfs_smbfs, OID_AUTO, debuglevel, CTLFLAG_RW, &smbfs_debuglevel, 0, ""); 76 77static MALLOC_DEFINE(M_SMBFSHASH, "SMBFS hash", "SMBFS hash table"); 78 79 80static int smbfs_mount(struct mount *, char *, caddr_t, 81 struct nameidata *, struct thread *); | 33 */ 34#include "opt_netsmb.h" 35#ifndef NETSMB 36#error "SMBFS requires option NETSMB" 37#endif 38 39#include <sys/param.h> 40#include <sys/systm.h> --- 33 unchanged lines hidden (view full) --- 74SYSCTL_INT(_vfs_smbfs, OID_AUTO, version, CTLFLAG_RD, &smbfs_version, 0, ""); 75SYSCTL_INT(_vfs_smbfs, OID_AUTO, debuglevel, CTLFLAG_RW, &smbfs_debuglevel, 0, ""); 76 77static MALLOC_DEFINE(M_SMBFSHASH, "SMBFS hash", "SMBFS hash table"); 78 79 80static int smbfs_mount(struct mount *, char *, caddr_t, 81 struct nameidata *, struct thread *); |
82static int smbfs_quotactl(struct mount *, int, uid_t, caddr_t, struct thread *); |
|
82static int smbfs_root(struct mount *, struct vnode **); | 83static int smbfs_root(struct mount *, struct vnode **); |
84static int smbfs_start(struct mount *, int, struct thread *); |
|
83static int smbfs_statfs(struct mount *, struct statfs *, struct thread *); 84static int smbfs_sync(struct mount *, int, struct ucred *, struct thread *); 85static int smbfs_unmount(struct mount *, int, struct thread *); 86static int smbfs_init(struct vfsconf *vfsp); | 85static int smbfs_statfs(struct mount *, struct statfs *, struct thread *); 86static int smbfs_sync(struct mount *, int, struct ucred *, struct thread *); 87static int smbfs_unmount(struct mount *, int, struct thread *); 88static int smbfs_init(struct vfsconf *vfsp); |
89static int smbfs_uninit(struct vfsconf *vfsp); |
|
87 88static struct vfsops smbfs_vfsops = { 89 smbfs_mount, | 90 91static struct vfsops smbfs_vfsops = { 92 smbfs_mount, |
90 vfs_stdstart, | 93 smbfs_start, |
91 smbfs_unmount, 92 smbfs_root, | 94 smbfs_unmount, 95 smbfs_root, |
93 vfs_stdquotactl, | 96 smbfs_quotactl, |
94 smbfs_statfs, 95 smbfs_sync, 96 vfs_stdvget, 97 vfs_stdfhtovp, /* shouldn't happen */ 98 vfs_stdcheckexp, 99 vfs_stdvptofh, /* shouldn't happen */ 100 smbfs_init, | 97 smbfs_statfs, 98 smbfs_sync, 99 vfs_stdvget, 100 vfs_stdfhtovp, /* shouldn't happen */ 101 vfs_stdcheckexp, 102 vfs_stdvptofh, /* shouldn't happen */ 103 smbfs_init, |
101 vfs_stduninit, | 104 smbfs_uninit, |
102 vfs_stdextattrctl 103}; 104 105 106VFS_SET(smbfs_vfsops, smbfs, VFCF_NETWORK); 107 108MODULE_DEPEND(smbfs, netsmb, NSMB_VERSION, NSMB_VERSION, NSMB_VERSION); 109MODULE_DEPEND(smbfs, libiconv, 1, 1, 1); --- 194 unchanged lines hidden (view full) --- 304 ASSERT_VOP_LOCKED(vp, "smbfs_root"); 305 vp->v_vflag |= VV_ROOT; 306 np = VTOSMB(vp); 307 smp->sm_root = np; 308 *vpp = vp; 309 return 0; 310} 311 | 105 vfs_stdextattrctl 106}; 107 108 109VFS_SET(smbfs_vfsops, smbfs, VFCF_NETWORK); 110 111MODULE_DEPEND(smbfs, netsmb, NSMB_VERSION, NSMB_VERSION, NSMB_VERSION); 112MODULE_DEPEND(smbfs, libiconv, 1, 1, 1); --- 194 unchanged lines hidden (view full) --- 307 ASSERT_VOP_LOCKED(vp, "smbfs_root"); 308 vp->v_vflag |= VV_ROOT; 309 np = VTOSMB(vp); 310 smp->sm_root = np; 311 *vpp = vp; 312 return 0; 313} 314 |
315/* 316 * Vfs start routine, a no-op. 317 */ 318/* ARGSUSED */ 319static int 320smbfs_start(mp, flags, td) 321 struct mount *mp; 322 int flags; 323 struct thread *td; 324{ 325 SMBVDEBUG("flags=%04x\n", flags); 326 return 0; 327} 328 329/* 330 * Do operations associated with quotas, not supported 331 */ 332/* ARGSUSED */ 333static int 334smbfs_quotactl(mp, cmd, uid, arg, td) 335 struct mount *mp; 336 int cmd; 337 uid_t uid; 338 caddr_t arg; 339 struct thread *td; 340{ 341 SMBVDEBUG("return EOPNOTSUPP\n"); 342 return EOPNOTSUPP; 343} 344 |
|
312/*ARGSUSED*/ 313int 314smbfs_init(struct vfsconf *vfsp) 315{ 316#ifndef SMP 317 int name[2]; 318 int olen, ncpu, plen, error; 319 --- 7 unchanged lines hidden (view full) --- 327#ifdef SMBFS_USEZONE 328 smbfsmount_zone = zinit("SMBFSMOUNT", sizeof(struct smbmount), 0, 0, 1); 329#endif 330 smbfs_pbuf_freecnt = nswbuf / 2 + 1; 331 SMBVDEBUG("done.\n"); 332 return 0; 333} 334 | 345/*ARGSUSED*/ 346int 347smbfs_init(struct vfsconf *vfsp) 348{ 349#ifndef SMP 350 int name[2]; 351 int olen, ncpu, plen, error; 352 --- 7 unchanged lines hidden (view full) --- 360#ifdef SMBFS_USEZONE 361 smbfsmount_zone = zinit("SMBFSMOUNT", sizeof(struct smbmount), 0, 0, 1); 362#endif 363 smbfs_pbuf_freecnt = nswbuf / 2 + 1; 364 SMBVDEBUG("done.\n"); 365 return 0; 366} 367 |
368/*ARGSUSED*/ 369int 370smbfs_uninit(struct vfsconf *vfsp) 371{ 372 373 SMBVDEBUG("done.\n"); 374 return 0; 375} 376 |
|
335/* 336 * smbfs_statfs call 337 */ 338int 339smbfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) 340{ 341 struct smbmount *smp = VFSTOSMBFS(mp); 342 struct smbnode *np = smp->sm_root; --- 75 unchanged lines hidden --- | 377/* 378 * smbfs_statfs call 379 */ 380int 381smbfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) 382{ 383 struct smbmount *smp = VFSTOSMBFS(mp); 384 struct smbnode *np = smp->sm_root; --- 75 unchanged lines hidden --- |