Commit Graph

1681 Commits

Author SHA1 Message Date
riastradh
067afa9103 Complete removal of cred argument from bread in nilfs. 2015-03-29 14:12:28 +00:00
maxv
6e39240181 Remove the 'cred' argument from bread(). Remove a now unused var in
ffs_snapshot.c. Update the man page accordingly.

ok hannken@
2015-03-28 19:24:04 +00:00
maxv
bb338d5f26 Remove the 'cred' argument from breadn(), and update the man page
accordingly.

ok hannken@
2015-03-28 17:23:42 +00:00
christos
8aabb2c561 make this compile again. 2015-02-25 23:14:59 +00:00
manu
d02097e5a9 Update file size after write without metadata flush
If we do not use metadata flush, we must make sure the size is updated
in the filesystem after a write, otherwise the next GETATTR will get us
a stale value and the file will be truncated.
2015-02-25 14:08:45 +00:00
hannken
645887d187 A union node may be reactivated while it is being reclaimed so
change union_freevp() to detach the vnode from the union node
by clearing the vnode backpointer and the lower node sizes.
2015-02-24 16:08:01 +00:00
maxv
14c9669847 Cosmetic changes:
- add a ffs-like ntfs_superblock_validate function
 - remove unused includes
 - fix some comments
 - KNF

No functional change.
2015-02-20 17:08:13 +00:00
martin
45d3953c44 Remove debug printf 2015-02-16 10:49:39 +00:00
hannken
8596fa407f Change union to vcache. Use address of the union node as key.
It would be better to use (uppervp, lowervp) as key, but either
may be NULL and may change any time.
2015-02-16 10:22:00 +00:00
hannken
c20c5717d4 Add reference count to union node. 2015-02-16 10:21:25 +00:00
hannken
9c6a12fd82 Remove a superfluous vref(), VOP_CREATE() was changed to
keep dvp referenced and locked some time ago.
2015-02-16 10:20:57 +00:00
manu
8abab6b782 Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE
FUSE filesystems do not expect to get metadata updates for [amc]time
and size, they updates the value on their own after operations.

The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache
flushes to the filesystem , and libperfuse uses it to match Linux FUSE
behavior.

While there, fix a bug in SETATTR: do not update kernel metadata cache
from SETATTR reply when the request is asynchronous, as we do not have
the reply yet.
2015-02-15 20:21:29 +00:00
mlelstv
b8751ed3e7 invalidate input mbuf as soon as it is consumed by the mbuf chain
to avoid a double free later.
2015-02-07 12:50:25 +00:00
maxv
40e39321ca Revert previous, it was a false positive.
In nilfs_mount_device() there's one branch where the node is not released:
when the device is already mounted. Not releasing it was thus intentional,
but this is something code scanners can't understand.
2015-02-07 10:40:57 +00:00
christos
abd5e6dfc6 fix devvp leak. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4
2015-02-07 04:25:16 +00:00
christos
aa2ab5b195 fix udf_node leak. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4
2015-02-07 04:18:03 +00:00
christos
5376d50617 fix mbuf leak; this is not being compiled yet.
Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4
2015-02-07 04:06:52 +00:00
martin
acbabd6a6a When udf_symlink() fails, do not explicitly call udf_delete_node(), as
vrele() called next will do that again - avoids a double free of the
bitmap, leading to a KASSERT failure (or worse in real life) in the
udf_symlink_long in the fs/vfs::t_vnops test.
2015-01-28 14:00:58 +00:00
christos
135c211dee catch up with DPRINTF change 2015-01-23 03:33:58 +00:00
christos
2d35608046 add some more paranoid checks about secsize and struct use. 2015-01-23 02:39:48 +00:00
maxv
ec1a3951d6 Fix a node leak.
Sent on tech-kern@, tested by martin@
2015-01-16 17:02:12 +00:00
manu
5fc94787c1 Make sure reads on empty files reach PUFFS filesystems
Sending a read through the page cache will get the operation
short-circuited. This is a problem with some filesystems that
expect to receive the read operation in order to update atime.

We fix that by bypassing the page cache when reading a file
wich a size known to be zero.
2015-01-13 16:39:51 +00:00
hannken
9e220db89c No need to load a vnode/fnode pair to lookup attributes on a ntnode.
Use ntfs_ntlookup()/ntfs_ntput() instead.
2015-01-06 11:04:00 +00:00
hannken
e8b589e23d Adjust printf and add missing ntfs_ntput(). 2015-01-06 11:03:09 +00:00
christos
ea82045eab add more debugging. 2015-01-04 16:19:12 +00:00
reinoud
5d76927e7e Add missing vrele() as found by the testsuite.
Thanks Jurgen Hannken for the patch.
2015-01-04 14:23:37 +00:00
christos
c182898b0d We have three sets of DTYPE_ constants in the kernel:
altq		Drop 		Type
	disklabel	Disk 		Type
	file		Descriptor	Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
2015-01-02 19:42:05 +00:00
hannken
d8577e15cb Add forgotten memset() to clear sysvbfs nodes before setting them up. 2015-01-02 16:51:02 +00:00
martin
833cbd818b Replace old style open array with C99 variant - cosmetic only, but should
help coverity.
2015-01-02 09:48:01 +00:00
maxv
8dfa44bc87 Small cleanup:
- KNF
 - malloc + memset -> malloc(|M_ZERO)
 - no need to check data == NULL
2014-12-29 17:17:54 +00:00
maxv
6a89606711 I started to KNF this file but quickly ended up figuring out I was not
courageous enough for such ugliness. So I only KNF'ed the first 300
lines.

I'll come back later.
2014-12-29 17:02:39 +00:00
maxv
0f13b9e40d Typos:
- "nessesary" -> "necessary" (comment)
 - "UNEXISTED" -> "NON-EXISTENT" (dprintf)
 - "NON-EXISTANT" -> "NON-EXISTENT" (dprintf)
 - "reach" -> "reaches" (comment)
2014-12-29 16:37:27 +00:00
hannken
9837a8c2e9 Change v7fs to vcache. 2014-12-29 15:29:38 +00:00
hannken
b1a3c148f6 Defer deallocating unlinked inodes to v7fs_reclaim().
Remove v7fs_vnode_reload() and always use v7fs_inode_load().  No need
to search for a vnode we already hold a reference on.
2014-12-29 15:28:58 +00:00
hannken
2d6e8595d5 v7fs_getattr: adjust size of symlinks by -1 to compensate the trailing NUL.
Should fix the v7fs part of PR kern/48864.
2014-12-29 15:28:08 +00:00
maxv
6387e6748f Make this more readable (KNF). 2014-12-28 14:42:56 +00:00
maxv
fc8f062e48 Prevent another division by zero in ntfs_loadntnode() by ensuring
spc != 0.
2014-12-28 13:11:52 +00:00
maxv
c1acce042f Ensure bps != 0 to prevent a division by zero. Zero byte per sector makes
no sense.
2014-12-28 12:57:44 +00:00
maxv
6d178278b3 Two typos:
- reserver4 -> reserved4 (in struct bootfile)
 - "inducates" -> "indicates" (comment)
2014-12-28 12:19:21 +00:00
maxv
ead51937de Make this more readable (KNF). 2014-12-28 12:13:22 +00:00
hannken
a9354f199f Change sysvbfs to vcache. 2014-12-26 15:23:21 +00:00
hannken
1ad4902933 Sysvbfs_rename: Call bfs_file_delete(bfs, to_name, true) before calling
bfs_file_rename() and remove the bfs_file_delete() from bfs_file_rename().

After calling bfs_file_rename() it was too late to set "tnode->removed"
as the inode already disappeared.
2014-12-26 15:22:15 +00:00
hannken
b34528880c Change smbfs from hashlist to vcache.
- Use (parent_vnode, name, name_len) as key.
- Change smbfs_nget() to return a referenced but unlocked vnode and
  adapt smbfs_setroot(), smbfs_create(), smbfs_mkdir() and smbfs_lookup().
2014-12-21 10:48:53 +00:00
justin
0e9af57062 Simplify control flow
Removes a variable and compiler warnings in some cases.
2014-12-07 23:48:04 +00:00
reinoud
65b5af65e0 Explicitly delete the failing node; it would be killed with the unlink too but
explicitly deleting it is better than just setting the file size to zero.
2014-12-03 21:37:55 +00:00
reinoud
a2b485ee86 Relax the KASSERT since an equal size is no issue 2014-12-03 21:34:55 +00:00
nakayama
687aa18d14 Avoid use after pool_put. 2014-11-25 12:33:13 +00:00
christos
53bfb03cf5 make this compile again. 2014-11-17 02:23:33 +00:00
christos
a95736d447 PR/49207: Kamil Rytarowski: Add sys/clock.h with generic time macros
(derived from clock_subr.h). Keep clock_subr.h with the kernel structures
and functions to reduce diffs, and have clock.h only include standalone
constants and macros.
2014-11-17 02:15:48 +00:00
nakayama
8c1c14022f Adjust smbfs/netsmb for filenames byte length changes that come as
a result of iconv conversion.  Most codes are taken from FreeBSD.
2014-11-15 18:52:44 +00:00