Date: Mon, 28 May 2012 12:11:55 +0000 From: vbotton@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r236588 - soc2012/vbotton/ntfs_apple Message-ID: <20120528121155.3298A106564A@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vbotton Date: Mon May 28 12:11:54 2012 New Revision: 236588 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=236588 Log: Delete useless includes, try to use ino_t instead of ino64_t Modified: soc2012/vbotton/ntfs_apple/ntfs_bitmap.c soc2012/vbotton/ntfs_apple/ntfs_collate.c soc2012/vbotton/ntfs_apple/ntfs_hash.c soc2012/vbotton/ntfs_apple/ntfs_inode.h soc2012/vbotton/ntfs_apple/ntfs_runlist.h soc2012/vbotton/ntfs_apple/ntfs_types.h soc2012/vbotton/ntfs_apple/ntfs_vfsops.c soc2012/vbotton/ntfs_apple/ntfs_vnops.c soc2012/vbotton/ntfs_apple/ntfs_volume.h Modified: soc2012/vbotton/ntfs_apple/ntfs_bitmap.c ============================================================================== --- soc2012/vbotton/ntfs_apple/ntfs_bitmap.c Mon May 28 12:01:35 2012 (r236587) +++ soc2012/vbotton/ntfs_apple/ntfs_bitmap.c Mon May 28 12:11:54 2012 (r236588) @@ -35,12 +35,9 @@ * http://developer.apple.com/opensource/licenses/gpl-2.txt. */ +#include <sys/types.h> #include <sys/errno.h> -#include <string.h> - -#include <kern/debug.h> - #include "ntfs_bitmap.h" #include "ntfs_debug.h" #include "ntfs_inode.h" Modified: soc2012/vbotton/ntfs_apple/ntfs_collate.c ============================================================================== --- soc2012/vbotton/ntfs_apple/ntfs_collate.c Mon May 28 12:01:35 2012 (r236587) +++ soc2012/vbotton/ntfs_apple/ntfs_collate.c Mon May 28 12:11:54 2012 (r236588) @@ -35,9 +35,6 @@ * http://developer.apple.com/opensource/licenses/gpl-2.txt. */ -#include <kern/debug.h> - -#include <string.h> #include "ntfs_collate.h" #include "ntfs_debug.h" Modified: soc2012/vbotton/ntfs_apple/ntfs_hash.c ============================================================================== --- soc2012/vbotton/ntfs_apple/ntfs_hash.c Mon May 28 12:01:35 2012 (r236587) +++ soc2012/vbotton/ntfs_apple/ntfs_hash.c Mon May 28 12:11:54 2012 (r236588) @@ -35,10 +35,10 @@ * http://developer.apple.com/opensource/licenses/gpl-2.txt. */ +#include <sys/types.h> #include <sys/cdefs.h> #include <sys/errno.h> -#include <sys/kernel_types.h> #include <sys/malloc.h> #include <sys/mount.h> #include <sys/queue.h> @@ -46,10 +46,6 @@ #include <sys/ucred.h> #include <sys/vnode.h> -#include <libkern/OSAtomic.h> -#include <libkern/OSMalloc.h> - -#include <kern/locks.h> #include "ntfs.h" #include "ntfs_debug.h" Modified: soc2012/vbotton/ntfs_apple/ntfs_inode.h ============================================================================== --- soc2012/vbotton/ntfs_apple/ntfs_inode.h Mon May 28 12:01:35 2012 (r236587) +++ soc2012/vbotton/ntfs_apple/ntfs_inode.h Mon May 28 12:11:54 2012 (r236588) @@ -80,7 +80,7 @@ inodes and is incremented/decremented in the base inode for attribute/raw inode opens/closes, too. */ - struct mutex lock; /* Lock serializing changes to the inode such + struct mtx lock; /* Lock serializing changes to the inode such as inode truncation and directory content modification (both take the lock exclusive) and calls like readdir and file read (these @@ -91,13 +91,14 @@ this is the size of an mst protected ntfs record. */ u8 block_size_shift; /* Log2 of the above. */ - lck_spin_t size_lock; /* Lock serializing access to inode sizes. */ + struct mtx size_lock; /* Lock serializing access to inode sizes. */ s64 allocated_size; /* Copy from the attribute record. */ s64 data_size; /* Copy from the attribute record. */ s64 initialized_size; /* Copy from the attribute record. */ u32 flags; /* NTFS specific flags describing this inode. See ntfs_inode_flags_shift below. */ - ino64_t mft_no; /* Number of the mft record / inode. */ + /*ino64_t mft_no;*/ + ino_t mft_no; /* Number of the mft record / inode. */ u16 seq_no; /* Sequence number of the inode. */ unsigned link_count; /* Number of hard links to this inode. Note we make this field an integer, i.e. at least @@ -187,7 +188,7 @@ * inodes. */ ntfs_inode *mft_ni; /* Pointer to the ntfs inode of $MFT. */ - buf_t m_buf; /* Buffer containing the mft record of the + struct buf m_buf; /* Buffer containing the mft record of the inode. This should only be touched by the ntfs_*mft_record_(un)map() functions. */ MFT_RECORD *m; /* Address of the buffer data and thus address @@ -400,7 +401,7 @@ static inline u32 NInoTestClear##flag(ntfs_inode *ni) \ { \ ni->flags &= ~((u32)1 << NI_##flag); \ - return (u32)((ni->flags >> NI_##flag) & 1) \ + return (u32)((ni->flags >> NI_##flag) & 1); \ } /* Emit the ntfs inode bitops functions. */ @@ -481,7 +482,8 @@ * possible on all architectures. */ struct _ntfs_attr { - ino64_t mft_no; + //ino64_t mft_no; + ino_t mft_no; ntfschar *name; u32 name_len; ATTR_TYPE type; Modified: soc2012/vbotton/ntfs_apple/ntfs_runlist.h ============================================================================== --- soc2012/vbotton/ntfs_apple/ntfs_runlist.h Mon May 28 12:01:35 2012 (r236587) +++ soc2012/vbotton/ntfs_apple/ntfs_runlist.h Mon May 28 12:11:54 2012 (r236588) @@ -114,12 +114,14 @@ { rl->rl = NULL; rl->alloc = rl->elements = 0; - lck_rw_init(&rl->lock, ntfs_lock_grp, ntfs_lock_attr); + //lck_rw_init(&rl->lock, ntfs_lock_grp, ntfs_lock_attr); + rw_init(&rl->lock, "runlist lock"); } static inline void ntfs_rl_deinit(ntfs_runlist *rl) { - lck_rw_destroy(&rl->lock, ntfs_lock_grp); + //lck_rw_destroy(&rl->lock, ntfs_lock_grp); + rw_destroy(&rl->lock); } /** Modified: soc2012/vbotton/ntfs_apple/ntfs_types.h ============================================================================== --- soc2012/vbotton/ntfs_apple/ntfs_types.h Mon May 28 12:01:35 2012 (r236587) +++ soc2012/vbotton/ntfs_apple/ntfs_types.h Mon May 28 12:11:54 2012 (r236588) @@ -108,5 +108,9 @@ /* Our boolean type. */ typedef int BOOL; +#define FALSE 0 +#define TRUE 1 + +typedef int errno_t; #endif /* !_OSX_NTFS_TYPES_H */ Modified: soc2012/vbotton/ntfs_apple/ntfs_vfsops.c ============================================================================== --- soc2012/vbotton/ntfs_apple/ntfs_vfsops.c Mon May 28 12:01:35 2012 (r236587) +++ soc2012/vbotton/ntfs_apple/ntfs_vfsops.c Mon May 28 12:11:54 2012 (r236588) @@ -35,28 +35,18 @@ * http://developer.apple.com/opensource/licenses/gpl-2.txt. */ +#include <sys/types.h> #include <sys/cdefs.h> -#include <sys/buf.h> #include <sys/disk.h> #include <sys/errno.h> #include <sys/fcntl.h> -#include <sys/kauth.h> -#include <sys/kernel_types.h> #include <sys/mount.h> #include <sys/param.h> #include <sys/systm.h> #include <sys/stat.h> -#include <sys/types.h> #include <sys/ucred.h> #include <sys/vnode.h> - -#include <mach/kern_return.h> -#include <mach/kmod.h> -#include <mach/machine/vm_param.h> - -#include <string.h> - -#include <miscfs/specfs/specdev.h> +#include <sys/buf.h> #include "ntfs.h" #include "ntfs_attr.h" Modified: soc2012/vbotton/ntfs_apple/ntfs_vnops.c ============================================================================== --- soc2012/vbotton/ntfs_apple/ntfs_vnops.c Mon May 28 12:01:35 2012 (r236587) +++ soc2012/vbotton/ntfs_apple/ntfs_vnops.c Mon May 28 12:11:54 2012 (r236588) @@ -35,6 +35,7 @@ * http://developer.apple.com/opensource/licenses/gpl-2.txt. */ +#include <sys/types.h> #include <sys/buf.h> #include <sys/errno.h> #include <sys/param.h> @@ -46,8 +47,6 @@ #include <sys/unistd.h> #include <sys/vnode.h> -#include <string.h> - #include "ntfs.h" #include "ntfs_attr.h" Modified: soc2012/vbotton/ntfs_apple/ntfs_volume.h ============================================================================== --- soc2012/vbotton/ntfs_apple/ntfs_volume.h Mon May 28 12:01:35 2012 (r236587) +++ soc2012/vbotton/ntfs_apple/ntfs_volume.h Mon May 28 12:11:54 2012 (r236588) @@ -172,7 +172,7 @@ initialized. */ le32 default_file_security_id; /* The security_id to use when creating files or 0 if not initialized. */ - lck_spin_t security_id_lock; /* Lock for serializing accesses to the + struct mtx security_id_lock; /* Lock for serializing accesses to the security_id related variables. */ /* * $Extend system directory is located in the root directory with inode
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120528121155.3298A106564A>