Commit Graph

1451 Commits

Author SHA1 Message Date
reinoud
d2126d9622 Fixes chflags. They were silently rejected before but the VFS standard demands
it complains with EOPNOTSUPP.

Fixes chflags test case.
2013-07-05 20:40:20 +00:00
reinoud
16cc237e7c Provide additional checks to udf_lookup and restructure it a bit.
Should fix PR 47988
2013-07-05 20:04:57 +00:00
reinoud
1a547d0334 Remove spurious empty line 2013-07-03 15:39:22 +00:00
reinoud
ab09c24f7a On removing a directory make sure the leaf directory doesn't have a valid '..'
link anymore. In a corner case this leaf can be held by a process as a CWD. It
is guaranteed to be empty at this stage so we trunc it removing the only valid
FID, being the '..' entry.

Solves part of PR kern/47987
Solves tests/vfs/t_vnops udf_dir_rmdirdotdot
2013-07-03 14:35:28 +00:00
reinoud
e6b5374ef7 Typo in debug message: we are removing a directory and not a file. 2013-07-03 12:55:34 +00:00
reinoud
d0b9530090 On growing a node that was recorded inside the (E)FE, don't forget to set the
size of the node to the NEW size. This was reported by the `t_io
udf_shrinkfile' testcase.

Fixes PR kern/47985
2013-07-03 11:50:59 +00:00
matt
d2b8f70ecf Make this compile again. 2013-06-28 17:13:34 +00:00
christos
c22fbb82f6 remove useless initialization, KNF
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html
2013-06-28 15:46:37 +00:00
christos
b9bf0e6c5d prevent memory leak on error
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html
2013-06-28 14:49:14 +00:00
reinoud
793c315af2 Since UDF volumes are always mounted async, the simple UBC purging with
VOP_PUTPAGES() was never triggered resulting in far too much data in the UBC
that needed to be written out. This could result in instability on small
memory machines.
2013-06-27 09:38:08 +00:00
dholland
e1610ba4cb Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of
the following symbols so as to disambiguate fully. (Christos already
did the lfs ones.)

   lblkno
   lblktosize
   lfragtosize
   numfrags
   blkroundup
   fragroundup
2013-06-23 07:28:36 +00:00
dholland
dab2b35444 blkoff() -> cd9660_blkoff()
blksize() -> cd9660_blksize()
2013-06-19 18:16:53 +00:00
dholland
4671554398 blkoff() -> filecore_blkoff()
blksize() -> filecore_blksize()
2013-06-19 18:16:10 +00:00
pooka
b2d1226abe Don't change a read-only file system. 2013-05-15 16:44:03 +00:00
reinoud
52cff03007 Fix Typo 2013-05-08 10:39:17 +00:00
reinoud
fa5ee9f6e0 Fix serious file read problem due to not-so-clear VOP_BMAP description. Should
fix PR 45605.
2013-05-08 10:29:22 +00:00
jakllsch
e7f2d5bd6f Don't attempt to mount file system with clusters larger than MAXBSIZE. 2013-04-15 14:10:59 +00:00
plunky
5ec364d4d9 C99 section 6.7.2.3 (Tags) Note 3 states that:
A type specifier of the form

	enum identifier

  without an enumerator list shall only appear after the type it
  specifies is complete.

which means that we cannot pass an "enum vtype" argument to
kauth_access_action() without fully specifying the type first.
Unfortunately there is a complicated include file loop which
makes that difficult, so convert this minimal function into a
macro (and capitalize it).

(ok elad@)
2013-03-18 19:35:35 +00:00
yamt
ca4fff9c14 comments
use sizeof(var) instead of sizeof(type) where possibly confusing
2013-03-06 11:40:22 +00:00
yamt
03d1621dc1 comment 2013-03-06 11:39:37 +00:00
christos
db2e654869 A little more debugging. 2013-01-28 00:17:18 +00:00
christos
50df1c7d20 don't need sys/mount.h in userland. 2013-01-27 22:04:19 +00:00
christos
3c0f9bd4e8 tidy up debugging printfs; no functional change. 2013-01-27 20:15:58 +00:00
christos
1ed2e30d40 fix fstat build. 2013-01-26 19:45:02 +00:00
christos
691bcd5dbb more cross-compile friendly. 2013-01-26 16:51:51 +00:00
christos
929f8943ca expose more stuff if MAKEFS is defined for the headers, and arrange for
the source file to be compilable from userland.
2013-01-26 00:21:49 +00:00
pooka
a0e33ce1e2 Do the protocol consistency check hack only when compiling ELF. 2013-01-16 21:10:14 +00:00
hannken
d845821cd8 Move the initialization of n to after the error branch.
From Taylor R Campbell <riastradh@netbsd.org>
2012-12-28 08:03:59 +00:00
hannken
1a15b095d2 Revert rev. 1.20 now that bread() has been fixed.
PR kern/46282 (6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread)
2012-12-20 11:44:39 +00:00
hannken
312d89f0de Change bread() and breadn() to never return a buffer on
error and modify all callers to not brelse() on error.

Welcome to 6.99.16

PR kern/46282 (6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread)
2012-12-20 08:03:41 +00:00
msaitoh
b6e1d8e8d8 Fix off by one error. 2012-12-07 06:50:15 +00:00
mbalmer
e3f283b63f Fix misspelling: accommodate is a long enough word to have room for two 'c's
and two 'm's.
2012-12-01 11:41:49 +00:00
nakayama
fb4e31b6db Improve smbfs timestamp handling.
Don't round timestamp to 2 seconds resolution if the server
supports the CAP_INFOLEVEL_PASSTHRU capability.
2012-11-30 23:24:21 +00:00
nakayama
33e8b488e1 - Remove redundant vput() before vgone().
- Avoid unnecessary mutex_exit() in smbfs_node_alloc().
- Set NGONE bit to from-name vnode to invalidate the smbnode cache.
2012-11-29 11:58:49 +00:00
nakayama
9dae46742e Various fixes for smbfs:
- Implement NGONE to fix caching issue described in PR kern/25070.
  Mostly taken from FreeBSD r125637.

- Revert revision 1.70 of smbfs_vnops.c to fix setattr to opened
  direcotry.  In case of SMB_CAP_NT_SMBS, NOPEN is set after
  smbfs_smb_ntcreatex() call.  If NOPEN is set in front, it will
  immediately return by condition at do_open label.

- In smbfs_close(), call smbfs_smb_close() and drop NOPEN bit in
  the case of direcotry.  Otherwise smbfs_rmdir() fails when the
  directory was opened.
2012-11-28 13:34:24 +00:00
nakayama
5f60ff96cb - fix endian cofusion around FID, which is used as is, so no need
to do byte swapping.
- put right value to ByteCount of SMB_COM_NT_CREATE_ANDX request.

The fix makes smbfs actually works on big-endian port.
2012-11-24 19:48:24 +00:00
dholland
35ed690545 Excise struct componentname from the namecache.
This uglifies the interface, because several operations need to be
passed the namei flags and cache_lookup also needs for the time being
to be passed cnp->cn_nameiop. Nonetheless, it's a net benefit.

The glop should be able to go away eventually but requires structural
cleanup elsewhere first.

This change requires a kernel bump.
2012-11-05 17:27:37 +00:00
dholland
1617a81dd1 Disentangle the namecache from the internals of namei.
- Move the namecache's hash computation to inside the namecache code,
instead of being spread out all over the place. Remove cn_hash from
struct componentname and delete all uses of it.

 - It is no longer necessary (if it ever was) for cache_lookup and
cache_lookup_raw to clear MAKEENTRY from cnp->cn_flags for the cases
that cache_enter already checks for.

 - Rearrange the interface of cache_lookup (and cache_lookup_raw) to
make it somewhat simpler, to exclude certain nonexistent error
conditions, and (most importantly) to make it not require write access
to cnp->cn_flags.

This change requires a kernel bump.
2012-11-05 17:24:09 +00:00
dholland
26486df952 Fix build of fs/unionfs (the extra unused copy of onionfs) for the
quota changes.
2012-11-05 17:16:59 +00:00
jakllsch
48958e522b Stylistic changes in comments/strings:
"FAT" and "fat" are different things, use the appropriate case.
"GEMDOS" is all caps.
2012-11-04 17:57:59 +00:00
jakllsch
1203d9864d And correct a typo that wasn't corrected in previous. 2012-11-04 17:35:27 +00:00
jakllsch
3a46a43ff0 Correct constant in comment to match the expression it is derived from. 2012-11-04 17:33:46 +00:00
jakllsch
a8a5260437 Check that the FSInfo block's next free cluster suggestion is actually
a cluster within the bounds of the volume too.
2012-11-04 17:18:56 +00:00
jakllsch
1afc21ab39 ((u_long)-1) will not always be 0xffffffff, which is what we actually
want to test against to determine if the FSInfo block's next free
cluster suggestion is valid
2012-11-04 17:16:37 +00:00
christos
81f024e94e rename ptyfs_flag -> ptyfs_status to avoid confusion with ptyfs_flags 2012-10-24 23:36:15 +00:00
christos
0966ff043a fix the mystery of the bad directory times. 2012-10-23 23:31:00 +00:00
jakllsch
8b020b7eee We don't actually want to round the number of elements in the bitmap
down.  Fixes a self-inflicted buffer overrun.

(This was detected by chance that the top of the bitmap coincided with
a page boundary.)
2012-10-03 23:32:43 +00:00
mlelstv
c7b0abd4dd Use getdisksize() to find out geometry, fetch only other magic values
from disklabel.
2012-10-03 07:20:50 +00:00
riastradh
7fad9ac861 Uncomment call to genfs_rename_cache_purge.
Fixes a side issue mentioned in PR kern/46990.

I left this commented to preserve the old behaviour of tmpfs_rename,
but it is obviously broken to omit the cache purge, and I'm surprised
nobody had encountered any problems with it until now.
2012-09-27 17:40:51 +00:00
riastradh
d0eacb2c29 Check tmpfs_rmdired_p after tmpfs_vnode_get when walking up the tree.
tmpfs_vnode_get drops all locks except possibly the reclaiming bit
lock to keep the tmpfs node from being reclaimed while we're still
interested in it.  Consequently, it does not keep the directory's
existence invariant, so we must check that after tmpfs_vnode_get.

Fixes PR kern/46990.  Tested by Wolfgang Stukenbrock.
2012-09-25 16:11:42 +00:00