Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs/include/ntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6285/include/ntfs
Modified Files:
device.h device_io.h
Log Message:
Wheee! Lots of last minute fixes and enhancements.
- Compiler warning fixes for gnome-vfs and fuse modules. (Anton)
- Change volume mounting (actually device opening) to happen with
O_EXCL bit set so at least on Linux no one can change the device
block size under our feet. (Anton)
- Change volume mounting and mkntfs to set the device block size to the
sector size using BLKBSZSET ioctl (Linux only). This should be
optimal for performance and should fixes the bug of not being able to
create the backup boot sector if the number of sectors on the device
is odd, the sector size is 512 bytes, and the kernel is 2.4. (Anton)
- Enforce cluster size, mft record size, and index record size to be at
least equal to the sector size and verify they are still valid and in
particular display a warning message if the volume will not be
mountable by the kernel driver (it requires mft record size and index
record size to be below or equal to the system page size which we
determine using sysconf()). (Anton)
Index: device.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/include/ntfs/device.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- device.h 19 Nov 2005 14:55:51 -0000 1.11
+++ device.h 3 Feb 2006 22:19:18 -0000 1.12
@@ -1,7 +1,7 @@
/*
* device.h - Exports for low level device io. Part of the Linux-NTFS project.
*
- * Copyright (c) 2000-2004 Anton Altaparmakov
+ * Copyright (c) 2000-2006 Anton Altaparmakov
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@@ -118,5 +118,6 @@ extern s64 ntfs_device_partition_start_s
extern int ntfs_device_heads_get(struct ntfs_device *dev);
extern int ntfs_device_sectors_per_track_get(struct ntfs_device *dev);
extern int ntfs_device_sector_size_get(struct ntfs_device *dev);
+extern int ntfs_device_block_size_set(struct ntfs_device *dev, int block_size);
#endif /* defined _NTFS_DEVICE_H */
Index: device_io.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/include/ntfs/device_io.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- device_io.h 31 Oct 2005 01:15:12 -0000 1.6
+++ device_io.h 3 Feb 2006 22:19:18 -0000 1.7
@@ -1,7 +1,7 @@
/*
* device_io.h - Exports for default device io. Part of the Linux-NTFS project.
*
- * Copyright (c) 2000-2004 Anton Altaparmakov
+ * Copyright (c) 2000-2006 Anton Altaparmakov
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@@ -36,7 +36,7 @@
#else /* __CYGWIN32__ */
#ifndef HDIO_GETGEO
-# define HDIO_GETGEO 0x10000301
+# define HDIO_GETGEO 0x301
/**
* struct hd_geometry -
*/
@@ -48,13 +48,16 @@ struct hd_geometry {
};
#endif
#ifndef BLKGETSIZE
-# define BLKGETSIZE 0x10001260
+# define BLKGETSIZE 0x1260
#endif
#ifndef BLKSSZGET
-# define BLKSSZGET 0x10001268
+# define BLKSSZGET 0x1268
#endif
#ifndef BLKGETSIZE64
-# define BLKGETSIZE64 0x10001272
+# define BLKGETSIZE64 0x80041272
+#endif
+#ifndef BLKBSZSET
+# define BLKBSZSET 0x40041271
#endif
/* On Cygwin; use Win32 low level device operations. */
|