OpenBSD CVS

CVS log for src/sys/ntfs/ntfs_vnops.c


[BACK] Up to [local] / src / sys / ntfs

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.49 / (download) - annotate - [select for diffs], Mon May 13 11:17:40 2024 UTC (4 weeks ago) by semarie
Branch: MAIN
CVS Tags: HEAD
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

vfs: VOP_REMOVE: move vnode unlocking and ref dropping to FS-indep part

while here, ensure all vop_remove field are set, and always call the function.

the change is very conservative: it only adds vnode ref drop/unlock where it was
absent because it should be unreachable (and if it wasn't, it should fix
things).

ok miod@

Revision 1.48 / (download) - annotate - [select for diffs], Sun May 12 16:51:05 2024 UTC (4 weeks, 1 day ago) by semarie
Branch: MAIN
Changes since 1.47: +18 -1 lines
Diff to previous 1.47 (colored)

vfs: struct vops: show all members, even if NULL

In order to help code maintenance, explicitly add all `struct vops` members with
the current value (if not present, it is NULL), still using the C99 notation.

ok miod@

Revision 1.47 / (download) - annotate - [select for diffs], Fri Oct 15 06:30:06 2021 UTC (2 years, 7 months ago) by semarie
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.46: +4 -4 lines
Diff to previous 1.46 (colored)

vnode: remove vop_generic_{,is,un}lock stub functions

These functions are only stubs (returning 0). Replace them with nullop
function (same behaviour). There is no intented behaviour changes.

While here, reorder some vop_islocked member in structs to be next
others vop_{,un}lock members.

ok visa@

Revision 1.46 / (download) - annotate - [select for diffs], Thu Feb 27 09:10:31 2020 UTC (4 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.45: +4 -6 lines
Diff to previous 1.45 (colored)

Remove unused "struct proc *" argument from the following functions:

- ufs_chown() & ufs_chmod()
- ufs_reclaim()
- ext2fs_chown() & ext2fs_chmod()
- ntfs_ntget() & ntfs_ntput()
- ntfs_vgetex(), ntfs_ntlookup() & ntfs_ntlookupfile()

While here use `ap->a_p' directly when it is only required to re-enter
the VFS layer in order to help reducing the loop.

ok visa@

Revision 1.45 / (download) - annotate - [select for diffs], Mon Jan 20 23:21:56 2020 UTC (4 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

struct vops is not modified during runtime so use const which moves each
into read-only data segment.
OK deraadt@ tedu@

Revision 1.44 / (download) - annotate - [select for diffs], Wed May 2 02:24:56 2018 UTC (6 years, 1 month ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

Remove proc from the parameters of vn_lock(). The parameter is
unnecessary because curproc always does the locking.

OK mpi@

Revision 1.43 / (download) - annotate - [select for diffs], Sat Apr 28 03:13:05 2018 UTC (6 years, 1 month ago) by visa
Branch: MAIN
Changes since 1.42: +4 -5 lines
Diff to previous 1.42 (colored)

Clean up the parameters of VOP_LOCK() and VOP_UNLOCK(). It is always
curproc that does the locking or unlocking, so the proc parameter
is pointless and can be dropped.

OK mpi@, deraadt@

Revision 1.42 / (download) - annotate - [select for diffs], Thu Sep 1 08:40:39 2016 UTC (7 years, 9 months ago) by natano
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.41: +6 -69 lines
Diff to previous 1.41 (colored)

Remove the unused ntfs write code. ok benno beck

Revision 1.41 / (download) - annotate - [select for diffs], Sat Mar 19 12:04:16 2016 UTC (8 years, 2 months ago) by natano
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored)

Remove the unused flags argument from VOP_UNLOCK().

torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt

Revision 1.40 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:52 2015 UTC (9 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.39: +1 -2 lines
Diff to previous 1.39 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.39 / (download) - annotate - [select for diffs], Tue Feb 10 21:58:16 2015 UTC (9 years, 4 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.38: +4 -4 lines
Diff to previous 1.38 (colored)

Switch uiomovei(..., sizeof whatever, ...) to uiomove().

Revision 1.38 / (download) - annotate - [select for diffs], Tue Feb 10 21:56:10 2015 UTC (9 years, 4 months ago) by miod
Branch: MAIN
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

First step towards making uiomove() take a size_t size argument:
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@

Revision 1.37 / (download) - annotate - [select for diffs], Tue Dec 16 19:56:33 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.36: +2 -1 lines
Diff to previous 1.36 (colored)

must include lock.h if you want to play with locks

Revision 1.36 / (download) - annotate - [select for diffs], Sat Jul 12 18:43:52 2014 UTC (9 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Dec 14 02:57:25 2013 UTC (10 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.34: +30 -30 lines
Diff to previous 1.34 (colored)

Zero out dirent structures that will be copied out to avoid leaking garbage
in the padding or trailing name bytes.

ok beck@ millert@ espie@

Revision 1.34 / (download) - annotate - [select for diffs], Thu Dec 12 06:51:08 2013 UTC (10 years, 6 months ago) by guenther
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Set the d_off member as getdents() expects in ntfs_readdir()

ok and nudge jsing@

Revision 1.33 / (download) - annotate - [select for diffs], Mon Dec 2 16:05:07 2013 UTC (10 years, 6 months ago) by jsing
Branch: MAIN
Changes since 1.32: +37 -38 lines
Diff to previous 1.32 (colored)

Use appropriate format specifiers in debug messages. In particular, avoid
casting almost everything to u_int32_t, then formatting as a signed int
(which really helps when you're trying to debug based on 64-bit values).

Looked over by krw@

Revision 1.32 / (download) - annotate - [select for diffs], Sun Nov 24 16:02:30 2013 UTC (10 years, 6 months ago) by jsing
Branch: MAIN
Changes since 1.31: +46 -43 lines
Diff to previous 1.31 (colored)

Clean up the NTFS debug code - use uppercase names for the debug macros,
especially since 'dprintf' now has another meaning (at least outside of
the kernel). Tweak the macro syntax so we can avoid having to double
bracket all invocations. Also apply a good dose of style(9).

ok krw@

Revision 1.31 / (download) - annotate - [select for diffs], Tue Aug 13 05:52:26 2013 UTC (10 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.30: +8 -35 lines
Diff to previous 1.30 (colored)

Switch time_t, ino_t, clock_t, and struct kevent's ident and data
members to 64bit types.  Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments.  Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir.  Build perl with -DBIG_TIME.

Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.

DANGER: ABI incompatibility.  Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.

Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@

Revision 1.30 / (download) - annotate - [select for diffs], Thu Mar 28 02:08:39 2013 UTC (11 years, 2 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.29: +1 -4 lines
Diff to previous 1.29 (colored)

Handle the pathconf _PC_PATH_MAX, _PC_PIPE_BUF, _PC_ASYNC_IO,
_PC_PRIO_IO, and _PC_SYNC_IO names in VOP_PATHCONF(), as they're
fs-independent for us.  Since we don't support latter three on any
fs, we can also define the related _POSIX_{ASYNC,PRIO,SYNC}_IO
symbols in <unistd.h> (via sys/unistd.h) with value -1.

Also, zap pointless tty-only values from procfs(!).

ok beck@, deraadt@

Revision 1.29 / (download) - annotate - [select for diffs], Mon Jan 14 09:44:57 2013 UTC (11 years, 4 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.28: +6 -2 lines
Diff to previous 1.28 (colored)

Free the directory block buffer at the completion of a readdir,
significantly reducing NTFS kernel memory usage. Without this the buffer
is not usually freed until the vnode is reclaimed.

Tested by Sebastian Neuper.

ok beck@ krw@

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jan 13 04:07:49 2013 UTC (11 years, 5 months ago) by jsing
Branch: MAIN
Changes since 1.27: +24 -26 lines
Diff to previous 1.27 (colored)

Destatic.

ok krw@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Jan 3 16:06:01 2013 UTC (11 years, 5 months ago) by jsing
Branch: MAIN
Changes since 1.26: +11 -1 lines
Diff to previous 1.26 (colored)

Ensure that a directory link count is always 1 so that things like
fts_read() do not try to be smart and end up skipping over directories.
Additionally, ip->i_nlink will not be initialised until the ntnode has
been loaded for the file.

Makes find(1) behave predictably on a mounted NTFS file system.

ok miod@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jun 20 17:30:22 2012 UTC (11 years, 11 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.25: +11 -8 lines
Diff to previous 1.25 (colored)

Cleanup our filesystem pathconf() code a little bit to make it easier
to diff against FreeBSD's.

From Brad; no object file change on amd64.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Dec 20 09:13:07 2011 UTC (12 years, 5 months ago) by mikeb
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

respect the MNT_FORCE flag in ntfs_unmount and proceed even if there's
someone holding a system vnode.  prevents crashes with forced unmounts.
silence ntfs_reclaim so that kernel won't spit out vprint's angrily.

ok krw, beck

Revision 1.24 / (download) - annotate - [select for diffs], Mon Jul 4 20:35:35 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.23: +2 -3 lines
Diff to previous 1.23 (colored)

move the specfs code to a place people can see it; ok guenther thib krw

Revision 1.23 / (download) - annotate - [select for diffs], Tue Apr 5 14:14:07 2011 UTC (13 years, 2 months ago) by thib
Branch: MAIN
Changes since 1.22: +1 -2 lines
Diff to previous 1.22 (colored)

Every single vop_default is set to eopnotsupp, so retire it
and return EOPNOTSUPP directly from the VOP_* functions.

Filesystems should, at some point fill in every function
in the vop_default struct so we can get rid of the 'if'
statements in VOP_*.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Dec 21 20:14:43 2010 UTC (13 years, 5 months ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.21: +64 -88 lines
Diff to previous 1.21 (colored)

Bring back the "End the VOP experiment." diff, naddy's issues where
unrelated, and his alpha is much happier now.

OK deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Thu Nov 18 21:18:07 2010 UTC (13 years, 6 months ago) by miod
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Make sure readdir cookies are actually allocated with the correct size
(in case eventually we change their type from u_long to something else),
and do not truncate them to 32 bits in the ntfs code.
ok tedu@

Revision 1.20 / (download) - annotate - [select for diffs], Fri Sep 10 16:34:09 2010 UTC (13 years, 9 months ago) by thib
Branch: MAIN
Changes since 1.19: +88 -64 lines
Diff to previous 1.19 (colored)

Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)
have been resolved.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Sep 7 00:41:05 2010 UTC (13 years, 9 months ago) by thib
Branch: MAIN
Changes since 1.18: +64 -88 lines
Diff to previous 1.18 (colored)

Allow NTFS to compile by cutting it over to the new VOP world order.
Small cleanup while here, nuke the ntfs_bypass function and just
use eopnotsupp like every other filesystem, it makes no sense to
return ENOTTY for unimplemented VOPs.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Aug 12 04:05:03 2010 UTC (13 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.17: +6 -6 lines
Diff to previous 1.17 (colored)

clean up some macro obfuscation and assorted styling problems.
fix a bonus off by one bug.  ok matthew

Revision 1.17 / (download) - annotate - [select for diffs], Tue Apr 20 22:05:44 2010 UTC (14 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.16: +1 -4 lines
Diff to previous 1.16 (colored)

remove proc.h include from uvm_map.h.  This has far reaching effects, as
sysctl.h was reliant on this particular include, and many drivers included
sysctl.h unnecessarily.  remove sysctl.h or add proc.h as needed.
ok deraadt

Revision 1.16 / (download) - annotate - [select for diffs], Thu Aug 13 16:00:53 2009 UTC (14 years, 10 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.15: +2 -197 lines
Diff to previous 1.15 (colored)

- remove super-obvious comments from vnodeop_entries[]
- remove #ifdef someos blocks, makes this a tad easier to read

agreed by art@ and thib@

Revision 1.15 / (download) - annotate - [select for diffs], Thu Jul 9 22:29:56 2009 UTC (14 years, 11 months ago) by thib
Branch: MAIN
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)

Remove the VREF() macro and replaces all instances with a call to verf(),
which is exactly what the macro does.

Macro's that are nothing more then:
#define FUNCTION(arg) function(arg)
are almost always pointless and should go away.

OK blambert@
Agreed by many.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jun 2 20:48:48 2009 UTC (15 years ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.13: +4 -2 lines
Diff to previous 1.13 (colored)

- make sure biodone() gets run at IPL_BIO

OK thib@

Revision 1.13 / (download) - annotate - [select for diffs], Tue May 13 02:24:08 2008 UTC (16 years, 1 month ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.12: +1 -6 lines
Diff to previous 1.12 (colored)

Remove commented out NetBSD __KERNEL_RCSID macro usage.

ok dlg@

Revision 1.12 / (download) - annotate - [select for diffs], Sun Dec 9 21:28:53 2007 UTC (16 years, 6 months ago) by hshoexer
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

MALLOC/FREE -> malloc/free

ok gilles

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jun 1 23:52:38 2007 UTC (17 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.10: +17 -89 lines
Diff to previous 1.10 (colored)

more vop argument "ap = v" comment removal; ok pedro

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jan 9 12:43:16 2006 UTC (18 years, 5 months ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.9: +5 -1 lines
Diff to previous 1.9 (colored)

Put vprint() under DIAGNOSTIC, as to save space in generated ramdisks.
Inspiration from miod@, okay deraadt@. Tested on i386, macppc and amd64.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Oct 19 16:50:47 2005 UTC (18 years, 7 months ago) by pedro
Branch: MAIN
Changes since 1.8: +2 -6 lines
Diff to previous 1.8 (colored)

Remove v_vnlock from struct vnode, okay krw@ tedu@

Revision 1.8 / (download) - annotate - [select for diffs], Sat May 21 19:43:20 2005 UTC (19 years ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

fix parenthesis

Revision 1.7 / (download) - annotate - [select for diffs], Sat May 21 18:05:58 2005 UTC (19 years ago) by brad
Branch: MAIN
Changes since 1.6: +9 -16 lines
Diff to previous 1.6 (colored)

- use MIN()/MAX() rather than min()/max(), to avoid possible truncation
  of 64bit values to 'int'
- read always single cluster of data, to avoid confusing the buffer
  cache; this appears to fix the random file content corruption which
  happens when more than one cluster is read at the same time, i.e. for
  files > 3*cluster_size
- fix some questionable pointer arithmetics; gcc-3.4.x didn't like it
- g/c redundant debug printf
- remove all traces of non-working quota support
  add quota support to TODO - makes sense only once writing support
  would be implemented, and only once NTFS would support notion of file 'owner'
- use 64bit local variable for free space computation

From NetBSD

- Comment fixes from joris@

ok millert@ joris@ pedro@

Revision 1.6 / (download) - annotate - [select for diffs], Sat Apr 16 16:28:42 2005 UTC (19 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.5: +3 -1 lines
Diff to previous 1.5 (colored)



comment out some code which is causing ntfs panics due
to the fact ntfs uses the generic locking functions which
do not lock anything right now.

ok pedro@

Revision 1.5 / (download) - annotate - [select for diffs], Tue Mar 8 15:45:20 2005 UTC (19 years, 3 months ago) by pat
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.4: +1 -5 lines
Diff to previous 1.4 (colored)

fix a page fault that occurs when a reclaimed vnode is then reused.
from FreeBSD

ok pedro tedu miod, tested by millert and myself

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Sat Jun 7 10:47:03 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

add file to SMP branch

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:20 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Branch point for: SMP
Changes since 1.3: +2 -6 lines
Diff to previous 1.3 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.3 / (download) - annotate - [select for diffs], Tue May 20 03:36:42 2003 UTC (21 years ago) by tedu
Branch: MAIN
Changes since 1.2: +19 -19 lines
Diff to previous 1.2 (colored)

un __P

Revision 1.2 / (download) - annotate - [select for diffs], Tue May 20 03:23:12 2003 UTC (21 years ago) by mickey
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

fix the tags

Revision 1.1 / (download) - annotate - [select for diffs], Tue May 20 03:03:27 2003 UTC (21 years ago) by tedu
Branch: MAIN

by popular request, NTFS support.  read only.
The code comes from NetBSD and was ported by Julian Bordet.
ok deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.