Commit Graph

205 Commits

Author SHA1 Message Date
hannken f59f039ea5 Keep a pointer to the leaf mount. Needed for write gating where a
file system gets suspended and has layered mounts above it.

Welcome to 2.0G

Reviewed by: Bill Studenmund <wrstuden@netbsd.org>
2004-07-01 10:03:29 +00:00
christos aa30b4a3db cleanup casts in get/set u short/long so that we don't have const castaways. 2004-06-30 03:43:14 +00:00
jdolecek 2c83b7a91b set gmtoff in the structure returned by MNT_GETARGS call 2004-06-27 06:55:12 +00:00
drochner aeb9634dc0 fix some questionable pointer arithmetics; gcc-3.4.x
didn't like it
2004-06-24 16:52:03 +00:00
dillo 730a37a686 Use unsigned long for file size and location; avoids sign extension
for files >2GB.  Okayed by Martin Husemann.
2004-06-20 20:44:06 +00:00
jdolecek aaba5c2cd4 unify the statvfs-reporting related code to single smbfs_smb_statvfs routine
for easier maintenance; the decision to use either
SMB_TRANS2_QUERY_FS_INFORMATION or SMB_COM_QUERY_INFORMATION_DISK
is done inside it, the code for populating struct statvfs with values
is shared
2004-06-05 07:36:25 +00:00
jdolecek 88edd838ec set 'frag' size to the same value as the file system block size, so
that userland would pick up correct size of unit (it uses lower of
these values as the size of one 'block' for f_blocks et.al.)
fixes PR bin/25319 by Juan RP
2004-06-05 06:28:11 +00:00
wrstuden a39afd9fea Revert last two changes. Since union vnode private data do not follow
layerfs guidelines, whenever layerfs_snapshot() does something, it
won't be correct for unionfs.
2004-05-31 02:04:35 +00:00
yamt 305b098f04 use vn_lock instead of raw VOP_LOCK. 2004-05-30 20:46:25 +00:00
tron 2295bcf960 Include "miscfs/genfs/layer_extern.h" to get prototype for
layerfs_snapshot().
2004-05-30 09:48:37 +00:00
wrstuden fc8849c40a unionfs can use layerfs_snapshot() too. 2004-05-29 23:49:31 +00:00
hannken 8c21bc6224 Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.
- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2004-05-25 14:54:55 +00:00
atatat 53c625655c Sysctl descriptions under vfs subtree 2004-05-25 04:44:43 +00:00
christos e944b1cdd8 Can't do the trick with using sbp as temporary storage; allocate memory
instead.
2004-05-24 03:09:48 +00:00
jdolecek 58218d4f0f add comments for values returned from the SMB request info used for statvfs 2004-05-23 11:18:28 +00:00
christos 223d219efc declare the correct variable; thanks Juan RP. 2004-05-22 22:13:50 +00:00
christos 880fcd4a6e simplify stats taking and avoid the extra copy on the stack. 2004-05-22 20:42:08 +00:00
atatat 10a7ba9ef6 Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
2004-05-20 06:34:24 +00:00
atatat 1d3a6a329e Explicitly call pool_init() (and pool_destroy()) when being built as
an _LKM.

This adds pools to the list of things that lkms must do manually
because they're set up with link sets.  Not that there's anything
wrong with link sets, but that we need to try harder to remember that
lkms are second class citizens.  Of a sort.
2004-05-20 05:39:34 +00:00
jrf 5f626331c1 caddr_t -> void * and removal of some more casts. 2004-05-12 02:07:37 +00:00
jrf e3a43961ff Remove caddr_t inlines. Approved by christos@NetBSD.org. 2004-05-04 13:26:58 +00:00
jrf fc97fd571a First pass for some caddr_t removal and changes to get rid of it where we
no longer use and/or need it

	- removed casts from unionfs, deadfs and fdesc
	  (there are more to hunt down still)
	- changed vfs_quotactl args argumet from caddr_t to void *
	- changed vfs_quotactl structures/callers to reflect the api change

Compiled fine and ran for about a day. Approved/reviewed by
christos@netbsd.org and gimpy@netbsd.org.
2004-04-27 17:37:30 +00:00
jdolecek d1e0d393ca initialize gmtoff in mount structure if mount version is < 3 2004-04-27 17:25:50 +00:00
christos 9ec61a4e56 fix compile error (thanks Juan RP) 2004-04-26 20:38:22 +00:00
christos c30382f197 fix fragment size. 2004-04-26 17:08:45 +00:00
christos 85a8e7acfa fill namemax 2004-04-26 17:08:34 +00:00
simonb b5d0e6bf06 Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.
2004-04-25 16:42:40 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
jdolecek 9705c5db44 properly version the msdosfs mount structure after addition
of gmt time offset support (Hi Itojun!); adresses most important
part of PR kern/25226 by Todd Whitesel
2004-04-19 07:53:58 +00:00
atatat 284a91c3ab Manually attach malloc types when being built as an lkm. 2004-03-27 04:43:43 +00:00
atatat 19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
jdolecek 2c39ad3ea5 remove apparently meaningless part of one debug printf insmbfs_lookup() 2004-03-22 16:40:48 +00:00
jdolecek d8d0d9d81f g/c redundant debug printf 2004-03-22 16:39:30 +00:00
jdolecek e36d8bbf0f in smbfs_smb_lookup(), check the returned (found) file name matches
exactly the filename we wanted to lookup, so that file names differing
in case are refused right away

resolves the chdir part of PR kern/22835 by Rob Quinn (cd succeeded when
it was supposed to fail)
2004-03-21 16:04:07 +00:00
jdolecek 93afaf4fc0 use SMBVDEBUG() instead of #ifdef SMB_VNODE_DEBUG 2004-03-21 13:43:46 +00:00
jdolecek 76763df930 no need of #ifdef SMB_VNODE_DEBUG around SMBVDEBUG() 2004-03-21 13:43:09 +00:00
jdolecek 8c5dfdc365 Allow the [, ], and = characters in non-8.3 filenames since they
are allowed by Windows (ref: MS KB article 120138).

Change follows FreeBSD rev. 1.40
2004-03-21 10:24:01 +00:00
jdolecek 64022a06e1 Add missing permission checks to the smbfs VOP_SETATTR vnode op for the
case where the caller requests to change access or modification times.
Change obtained from FreeBSD rev. 1.30
2004-03-20 21:03:42 +00:00
jdolecek bfa09b45ff ditch busted access check in smbfs_access(), and use vaccess() instead;
also normalize function contents to resemble other filesystems,
and add a SMBVDEBUG() to ease eventual future debugging

partially based on FreeBSD rev. 1.29

fixes PR kern/23373 by Piotr Stolc
2004-03-20 20:26:28 +00:00
jdolecek f3503f30a7 escape the backslash in badchars so that smbfs_pathcheck() correctly
rejects pathnames with backslashes in them (and to avoid a syntax error)

change from FreeBSD
2004-03-20 19:48:30 +00:00
jdolecek edb0fb0a4c pullup FreeBSD change rev. 1.44 - restore closing of SMB find handle
in smbfs_close(); it's necessary to overcome limitation of the current
directory lookup code

this fixes problem where ls wouldn't show newly created files, such as:
> touch a b c
> ls
>

problem and fix pointed out by YAMAMOTO Takashi
2004-03-20 18:41:02 +00:00
jdolecek 1c8e4dd167 add comment to smbfs_remove() regarding the limitation to only remove
unreferenced files
2004-02-29 12:19:15 +00:00
jdolecek b4b58e65b1 print info about active vnodes in reclaim/inactive if prtactive is set 2004-02-29 12:17:39 +00:00
jdolecek 1a3236aefa close the SMB handle when vnode is inactivated, rather than on file close,
so that mmap()ped regions remain accessible even when the file descriptor
is closed
g/c smbnode's n_opencount, and have single NOPEN flag instead

fixes PR kern/24516 by Lloyd Parkes

change obtained from FreeBSD, with only minor adjustments
2004-02-29 11:47:08 +00:00
jdolecek 4ba68533b9 use global prtactive setting instead of ntfs-specific variable;
this also changes default, to not print the active vnodes
2004-02-29 11:08:55 +00:00
jdolecek 8af8547957 smbfs_rename(): #ifdef notyet some code related to disabled smbfs_smb_move(),
and also fix a return in the code section - we need to do vnode cleanup
before returning error
2004-02-28 09:19:53 +00:00
jdolecek 0a48f48a91 smbfs_rename(): only touch attribute cache properties if the operation
is carried out; particularily, don't touch it if the rename files
due to EXDEV - the 'from' or 'to' vnode may not be on smbfs filesystem
at all in that case
this is the final fix for PR kern/24455 by Milos Urbanek
2004-02-28 09:04:00 +00:00
wiz e4612a6a03 achieved, not acheived. From Peter Postma. 2004-02-24 15:23:16 +00:00
wiz dc4cc98b15 becuase -> because. From Peter Postma. 2004-02-24 15:05:53 +00:00
jdolecek 756045a44e fix PNBUF_PUT() calls:
* it should not be called for rmdir or remove vop
* for create and mkdir, it should only be called on error, or when
  SAVESTART flag is not set

fixes PR kern/24455 by Milos Urbanek
2004-02-22 11:14:08 +00:00