Commit Graph

4835 Commits (2b4c3a618c0ccdba4e846ff4182ef15ac596cb5d)
 

Author SHA1 Message Date
Erik Larsson 2b4c3a618c Replace all le16 "and" calculations with le16_and(...). 2016-01-28 08:28:50 +01:00
Erik Larsson e970b57c74 Replace all le32 zero "and" test conditions with le32_andz(...). 2016-01-28 08:28:49 +01:00
Erik Larsson 9f5ad52e5f Replace all le32 non-zero "and" test conditions with !le32_andz(...). 2016-01-28 08:28:48 +01:00
Erik Larsson 1b7bfaa133 Replace all le16 zero "and" test conditions with le16_andz(...). 2016-01-28 08:28:47 +01:00
Erik Larsson 35c72761c7 Replace all le16 non-zero "and" test conditions with !le16_andz(...). 2016-01-28 08:28:46 +01:00
Erik Larsson 01c493f16c Replace all be16 zero test conditions with "be16_cmpz(...)". 2016-01-28 08:28:45 +01:00
Erik Larsson 5097bb9ea3 Replace all sle64 zero test conditions with "sle64_cmpz(...)". 2016-01-28 08:28:44 +01:00
Erik Larsson 97ccd587d6 Replace all sle64 non-zero test conditions with "!sle64_cmpz(...)". 2016-01-28 08:28:43 +01:00
Erik Larsson 65eea3fe0a Replace all le64 zero test conditions with "le64_cmpz(...)". 2016-01-28 08:28:42 +01:00
Erik Larsson 17a2c5f58e Replace all le64 non-zero test conditions with "!le64_cmpz(...)". 2016-01-28 08:28:41 +01:00
Erik Larsson ed87a4dffa Replace all le32 zero test conditions with "le32_cmpz(...)". 2016-01-28 08:28:40 +01:00
Erik Larsson 18990412fa Replace all le32 non-zero test conditions with "!le32_cmpz(...)". 2016-01-28 08:28:39 +01:00
Erik Larsson e366bef954 Replace all le16 zero test conditions with "le16_cmpz(...)". 2016-01-28 08:28:38 +01:00
Erik Larsson 90697bb5ab Replace all le16 non-zero test conditions with "!le16_cmpz(...)". 2016-01-28 08:28:37 +01:00
Erik Larsson c29924872f Replace all be32 usage of the '==' operation with "be32_eq(...)". 2016-01-28 08:28:36 +01:00
Erik Larsson e616a84f21 Replace all be16 usage of the '==' operation with "be16_eq(...)". 2016-01-28 08:28:35 +01:00
Erik Larsson 0657987a0b Replace all sle64 usage of the '!=' operation with "!sle64_eq(...)". 2016-01-28 08:28:34 +01:00
Erik Larsson 7b85755080 Replace all sle64 usage of the '==' operation with "sle64_eq(...)". 2016-01-28 08:28:33 +01:00
Erik Larsson e1bd02ed74 Replace all sle16 usage of the '!=' operation with "!sle16_eq(...)". 2016-01-28 08:28:32 +01:00
Erik Larsson 94589cde03 Replace all sle16 usage of the '==' operation with "sle16_eq(...)". 2016-01-28 08:28:31 +01:00
Erik Larsson d61f8615d9 Replace all le64 usage of the '!=' operation with "!le64_eq(...)". 2016-01-28 08:28:30 +01:00
Erik Larsson 7a88d7821e Replace all le64 usage of the '==' operation with "le64_eq(...)". 2016-01-28 08:28:28 +01:00
Erik Larsson 0876896169 Replace all le32 usage of the '!=' operation with "!le32_eq(...)". 2016-01-28 08:28:27 +01:00
Erik Larsson 011a9e9e5e Replace all le32 usage of the '==' operation with "le32_eq(...)". 2016-01-28 08:28:26 +01:00
Erik Larsson 59a05b5c34 Replace all le16 usage of the '!=' operation with "!le16_eq(...)". 2016-01-28 08:28:25 +01:00
Erik Larsson 347bdf21ec Replace all le16 usage of the '==' operation with "le16_eq(...)". 2016-01-28 08:28:23 +01:00
Erik Larsson 48cb23265b Fix code to use const_cpu_to_X/const_X_to_cpu macros for constants.
This enables the compiler to optimize this code in cases where compiler
support for endianness swapping is not present.
2015-12-21 23:21:00 +01:00
Erik Larsson 58bb59487c endians.h: Add const endian conversion macros for s{l,b}e{16,32,64}. 2015-12-21 23:05:36 +01:00
Erik Larsson 9191d85e28 Use appropriate little-endian/big-endian types in struct definitions.
On-disk struct definitions used native types (u16/u32/u64/s16/s32/s64),
which doesn't say anything about the intended interpretation of the
data. The intention of having little-endian-specific types and
big-endian-specific types must have been to clarify interpretation of
data and intentions in the code. Therefore it seems reasonable to use
these types in struct definitions to clarify what data represention is
used to encode field data.

Because some struct members in layout.h are big-endian, this change also
means moving the duplicated definitions for big-endian byteswapping
macros and big-endian types found in acls.h and security.h to the
appropriate locations in endians.h and types.h respectively in order to
make them available for the struct definitions in layout.h.
2015-10-03 12:58:08 +02:00
Erik Larsson deeb0ad584 Version 2015.3.14. 2015-03-14 12:49:43 +01:00
Erik Larsson 807ee0f26c Enable ioctl in ntfs-3g unconditionally when building with fuse-lite.
fuse-lite announces a FUSE_VERSION which may not always match the exact
capabilities of the library. Hence we add a special case for 'ioctl',
which we know exists in fuse-lite regardless of the version number
published.
2015-03-14 11:11:43 +01:00
Erik Larsson 1ebf77f769 Fix improper #ifdef conditions around FUSE_CAP_IOCTL_DIR.
The capability actually appeared in FUSE 2.9, not 2.8. However in order
to maintain similarity to earlier #ifdef:s, we simpy check if
FUSE_CAP_IOCTL_DIR is defined rather than checking the FUSE version.
2015-03-14 06:53:31 +01:00
Erik Larsson d0cb2ea735 Version 2015.3.13. 2015-03-13 15:04:43 +01:00
Erik Larsson b970c69c02 usermap.c: Fix uninitialized variable warning in main.
If platform was non-Win32 and open_security_api() failed, the variable
'ok' would end up being uninitialized.
2015-03-13 09:06:17 +01:00
Erik Larsson 36f4957587 lowntfs-3g.c: Fix uninitialized variable warning in ntfs_fuse_getxattr.
The variable 'res' was never initialized if the #ifdef condition
'!KERNELPERMS | (POSIXACLS & !KERNELACLS)' evaluated to true and there
was an error allocating memory for 'value'.
2015-03-13 09:02:38 +01:00
Erik Larsson 82bb43eed3 ntfsclone.c: Compile fix for OS X.
OS X keeps the statfs declarations in sys/mount.h.
2015-03-13 08:59:20 +01:00
Erik Larsson 3f5d881a70 Compile fix for FUSE versions earlier than 2.8.0. 2015-03-13 08:57:38 +01:00
Jean-Pierre André b275f41cd8 Set release version 2015.3.5 2015-03-05 18:47:06 +01:00
Jean-Pierre André b2709f60ac Updated the copyright on the drivers to 2015 2015-03-05 18:25:17 +01:00
Jean-Pierre André 0101407feb Made to ignore the -s ("sloppy") mount option
autofs passes the sloppy option to mount(8) for all file systems to mean
that mount should not choke on invalid options such as those meant for
remote mounting on another operating system through nfs or cifs.
Following a recent change, mount(8) passes the -s option on to any file
system, even to local ones (which are not expected to get foreign options),
so ntfs-3g now has to ignore -s.
2015-01-22 08:42:43 +01:00
Jean-Pierre André 39c7d8538d Set the fuse protocol fall back to 7.12 when available
The support for ioctls has been added to fuse when using protocol 7.18,
and an equivalent upgrade has been done in fuse lite with commit [ae9aee].
For old kernels, a fall back to protocol 7.8 was implemented, but this
appears not to be supported in not-so-old kernels (e.g. 2.6.35).
With this patch, the fall back protocol is set to 7.12 or to the highest
level supported by the kernel.
2014-11-10 08:52:23 +01:00
Jean-Pierre André 3a8d923c13 Fixed accessing security attributes the old way on ntfs 3.x
When the security attribute is present, chkdsk may set a null security id
in the standard attributes, and this should not be considered as an error.
(this partially reverts commit [70e5b1])
2014-11-10 08:43:32 +01:00
Jean-Pierre André 3bfff8ea3f Fixed reading the MFT bitmap when expanding downward
When expanding downward the MFT bitmap was wrongly read when fragmented,
leading to inconsistencies and cancellation of the process.
2014-10-20 08:58:04 +02:00
Jean-Pierre André e1d2b7faa7 Silenced a const qualifier dropping (cosmetic) 2014-09-02 10:03:23 +02:00
Jean-Pierre André a7aa91d73d Developped an option --unused-fast for faster ntfswipe
When the new option --unused-fast is used, clusters which appear as wiped
are not written again. This is useful for avoiding virtual partitions to
be extended to their full size.

Contributed by michael
2014-09-02 09:55:53 +02:00
Jean-Pierre André c358191f91 Disabled option remove_hiberfile on read-only mounts
The mount options remove_hiberfile and read-only are contradictory.
When both are mentioned, ignore remove_hiberfile.
2014-09-02 09:50:27 +02:00
Jean-Pierre André b6152757c5 Reengineered the compression algorithm
This patch changes the algorithm to use hash chains instead of binary
trees, with much stronger hashing.  It also introduces useful (for
performance) parameters, such as the "nice match length" and "maximum
search depth", that are similar to those used in other commonly used
compression algorithms such as zlib's DEFLATE implementation.

The speed improvement is very significant, with some loss of compression
rate. The compression rate is still better than then Windows one.

Contributed by Eric Biggers
2014-09-02 09:45:16 +02:00
Jean-Pierre André 54833dffc0 Inserted missing ea.h and ioctl.h in devel file list
ea.h and ioctl.h were not mentioned in include/ntfs-3g/Makefile.am
so they were not released as public headers in devel files.
2014-09-02 09:39:12 +02:00
Jean-Pierre André c26a519da1 Fixed fstrim(8) applied to partitions
The new way goes via /sys/dev/block/MAJOR:MINOR to map partitions to
devices and get discard parameters of the parent device. It also ensures
that the partition is aligned to the discard block size.

Contributed by Richard W.M. Jones
2014-08-04 17:39:50 +02:00
Jean-Pierre André f4e3f126df Implemented fstrim(8)
fstrim(8) discards unused blocks on a mounted filesystem. It is useful for
solid-state drives (SSDs) and thinly-provisioned storage.
Only trimming the full device (with no option) is supported.

Contributed by Richard W.M. Jones
2014-07-31 14:03:11 +02:00