* mount.cc (NETAPP_IGNORE): Add FILE_PERSISTENT_ACLS.

(FS_IS_NETAPP_DATAONTAP): Drop test for FILE_PERSISTENT_ACLS.
	(fs_info::update): Set filetype to ntfs in remote case, too.  Fix a
	couple of comments.  Add test for Netapps faking to be FAT.

	* mount.h (IMPLEMENT_FS_FLAG): Simplify definition and usage.
This commit is contained in:
Corinna Vinschen 2010-11-22 14:19:50 +00:00
parent 9dda712bd9
commit fc0fb0ba13
3 changed files with 38 additions and 25 deletions

View File

@ -1,3 +1,12 @@
2010-11-22 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (NETAPP_IGNORE): Add FILE_PERSISTENT_ACLS.
(FS_IS_NETAPP_DATAONTAP): Drop test for FILE_PERSISTENT_ACLS.
(fs_info::update): Set filetype to ntfs in remote case, too. Fix a
couple of comments. Add test for Netapps faking to be FAT.
* mount.h (IMPLEMENT_FS_FLAG): Simplify definition and usage.
2010-11-22 Corinna Vinschen <corinna@vinschen.de>
* net.cc (get_ipv4fromreg_ipcnt): Fix debug output. Only create debug

View File

@ -299,12 +299,12 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
| FILE_CASE_PRESERVED_NAMES \
| FILE_PERSISTENT_ACLS)
/* Netapp DataOnTap. */
#define NETAPP_IGNORE FILE_SUPPORTS_SPARSE_FILES
#define NETAPP_IGNORE (FILE_SUPPORTS_SPARSE_FILES \
| FILE_PERSISTENT_ACLS)
#define FS_IS_NETAPP_DATAONTAP TEST_GVI(flags () & ~NETAPP_IGNORE, \
FILE_CASE_SENSITIVE_SEARCH \
| FILE_CASE_PRESERVED_NAMES \
| FILE_UNICODE_ON_DISK \
| FILE_PERSISTENT_ACLS \
| FILE_NAMED_STREAMS)
/* These are the minimal flags supported by NTFS since NT4. Every filesystem
not supporting these flags is not a native NTFS. We subsume them under
@ -335,19 +335,23 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
samba_version (extended_info->samba_version);
}
}
/* First check the remote filesystems faking to be NTFS. */
if (!got_fs () && RtlEqualUnicodeString (&fsname, &ro_u_ntfs, FALSE)
/* First check the remote filesystems claiming to be NTFS. */
if (!got_fs ()
&& is_ntfs (RtlEqualUnicodeString (&fsname, &ro_u_ntfs, FALSE))
/* Test for Samba on NT4 or for older Samba releases not supporting
extended info. */
&& !is_samba (FS_IS_SAMBA)
/* Netapp inode info is unusable. */
/* Netapp inode info is unusable, can't handle trailing dots and
spaces, has a bug in "move and delete" semantics. */
&& !is_netapp (FS_IS_NETAPP_DATAONTAP))
/* Any other remote FS faking to be NTFS. */
is_cifs (!FS_IS_WINDOWS_NTFS);
/* Then check the remote filesystems faking to be FAT. Right now all
of them are subsumed under the "CIFS" filesystem type. */
/* Then check remote filesystems claiming to be FAT. Except for real
FAT and Netapp, all of them are subsumed under the "CIFS" filesystem
type for now. */
if (!got_fs ()
&& is_fat (RtlEqualUnicodePathPrefix (&fsname, &ro_u_fat, TRUE)))
&& is_fat (RtlEqualUnicodePathPrefix (&fsname, &ro_u_fat, TRUE))
&& !is_netapp (FS_IS_NETAPP_DATAONTAP))
is_cifs (!FS_IS_WINDOWS_FAT);
/* Then check remote filesystems honest about their name. */
if (!got_fs ()
@ -383,7 +387,7 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
other filesystems like NFS.
UNUSED, but keep in for information purposes. */
has_buggy_basic_info (is_nwfs ());
/* Netapp ans NWFS are too dumb to allow non-DOS filesystems
/* Netapp and NWFS are too dumb to allow non-DOS filenames
containing trailing dots and spaces when accessed from Windows
clients. We subsume CIFS into this class of filesystems right
away since at least some of them are not capable either. */

View File

@ -37,9 +37,9 @@ extern struct fs_names_t {
bool block_device;
} fs_names[];
#define IMPLEMENT_FS_FLAG(func, flag) \
bool func (bool val) { if (val) status.fs_type = flag; return val; } \
bool func () const { return status.fs_type == flag; }
#define IMPLEMENT_FS_FLAG(type) \
bool is_##type (bool val) { if (val) status.fs_type = type; return val; } \
bool is_##type () const { return status.fs_type == type; }
class fs_info
{
@ -84,19 +84,19 @@ class fs_info
IMPLEMENT_STATUS_FLAG (bool, has_buggy_fileid_dirinfo)
IMPLEMENT_STATUS_FLAG (bool, has_buggy_basic_info)
IMPLEMENT_STATUS_FLAG (bool, has_dos_filenames_only)
IMPLEMENT_FS_FLAG (is_fat, fat)
IMPLEMENT_FS_FLAG (is_ntfs, ntfs)
IMPLEMENT_FS_FLAG (is_samba, samba)
IMPLEMENT_FS_FLAG (is_nfs, nfs)
IMPLEMENT_FS_FLAG (is_netapp, netapp)
IMPLEMENT_FS_FLAG (is_cdrom, cdrom)
IMPLEMENT_FS_FLAG (is_udf, udf)
IMPLEMENT_FS_FLAG (is_csc_cache, csc_cache)
IMPLEMENT_FS_FLAG (is_sunwnfs, sunwnfs)
IMPLEMENT_FS_FLAG (is_unixfs, unixfs)
IMPLEMENT_FS_FLAG (is_mvfs, mvfs)
IMPLEMENT_FS_FLAG (is_cifs, cifs)
IMPLEMENT_FS_FLAG (is_nwfs, nwfs)
IMPLEMENT_FS_FLAG (fat)
IMPLEMENT_FS_FLAG (ntfs)
IMPLEMENT_FS_FLAG (samba)
IMPLEMENT_FS_FLAG (nfs)
IMPLEMENT_FS_FLAG (netapp)
IMPLEMENT_FS_FLAG (cdrom)
IMPLEMENT_FS_FLAG (udf)
IMPLEMENT_FS_FLAG (csc_cache)
IMPLEMENT_FS_FLAG (sunwnfs)
IMPLEMENT_FS_FLAG (unixfs)
IMPLEMENT_FS_FLAG (mvfs)
IMPLEMENT_FS_FLAG (cifs)
IMPLEMENT_FS_FLAG (nwfs)
fs_info_type what_fs () const { return status.fs_type; }
ULONG serial_number () const { return sernum; }