From owner-svn-soc-all@FreeBSD.ORG Mon May 28 12:11:57 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 3298A106564A for ; Mon, 28 May 2012 12:11:55 +0000 (UTC) (envelope-from vbotton@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Mon, 28 May 2012 12:11:55 +0000 Date: Mon, 28 May 2012 12:11:55 +0000 From: vbotton@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120528121155.3298A106564A@hub.freebsd.org> Cc: Subject: socsvn commit: r236588 - soc2012/vbotton/ntfs_apple X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2012 12:11:57 -0000 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 #include -#include - -#include - #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 - -#include #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 #include #include -#include #include #include #include @@ -46,10 +46,6 @@ #include #include -#include -#include - -#include #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 #include -#include #include #include #include -#include -#include #include #include #include #include -#include #include #include - -#include -#include -#include - -#include - -#include +#include #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 #include #include #include @@ -46,8 +47,6 @@ #include #include -#include - #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