* globals.cc (ro_u_ncfsd): New R/O unicode string.

* mount.cc (fs_info::update): Check for "NcFsd" FS.  Set flags and
	change comments accordingly.
	(fs_names): Add entry for NcFsd FS.
	* mount.h (enum fs_info_type): Add ncfsd.
	(class fs_info): Add ncfsd flag and accessor methods.
	* path.h (class path_conv): Add fs_is_ncfsd method.
	* syscalls.cc (unlink_nt): Experimentally try delete-on-close on NcFsd
	in STATUS_CANNOT_DELETE case.
This commit is contained in:
Corinna Vinschen 2011-10-21 08:29:19 +00:00
parent b2099ee728
commit 69178ca038
6 changed files with 31 additions and 10 deletions

View File

@ -1,3 +1,15 @@
2011-10-21 Corinna Vinschen <corinna@vinschen.de>
* globals.cc (ro_u_ncfsd): New R/O unicode string.
* mount.cc (fs_info::update): Check for "NcFsd" FS. Set flags and
change comments accordingly.
(fs_names): Add entry for NcFsd FS.
* mount.h (enum fs_info_type): Add ncfsd.
(class fs_info): Add ncfsd flag and accessor methods.
* path.h (class path_conv): Add fs_is_ncfsd method.
* syscalls.cc (unlink_nt): Experimentally try delete-on-close on NcFsd
in STATUS_CANNOT_DELETE case.
2011-10-20 Christopher Faylor <me.cygwin2011@cgf.cx>
Throughout change TTY_* to PTY_*, tty_* to pty_*, and ttym_* to ptmx_*.

View File

@ -105,6 +105,7 @@ UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS");
UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF");
UNICODE_STRING _RDATA ro_u_unixfs = _ROU (L"UNIXFS");
UNICODE_STRING _RDATA ro_u_nwfs = _ROU (L"NWFS");
UNICODE_STRING _RDATA ro_u_ncfsd = _ROU (L"NcFsd");
UNICODE_STRING _RDATA ro_u_volume = _ROU (L"\\??\\Volume{");
UNICODE_STRING _RDATA ro_u_pipedir = _ROU (L"\\\\?\\PIPE\\");
UNICODE_STRING _RDATA ro_u_globalroot = _ROU (L"\\\\.\\GLOBALROOT");

View File

@ -360,7 +360,9 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
and stuff like that. */
&& !is_mvfs (RtlEqualUnicodePathPrefix (&fsname, &ro_u_mvfs, FALSE))
/* NWFS == Novell Netware FS. Broken info class, see below. */
/* NcFsd == Novell Netware FS via own driver since Windows Vista. */
&& !is_nwfs (RtlEqualUnicodeString (&fsname, &ro_u_nwfs, FALSE))
&& !is_ncfsd (RtlEqualUnicodeString (&fsname, &ro_u_ncfsd, FALSE))
/* UNIXFS == TotalNet Advanced Server (TAS). Doesn't support
FileIdBothDirectoryInformation. See below. */
&& !is_unixfs (RtlEqualUnicodeString (&fsname, &ro_u_unixfs, FALSE)))
@ -377,22 +379,23 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
Know example: EMC NS-702. We just don't use that info class on
any remote CIFS. */
has_buggy_fileid_dirinfo (is_cifs () || is_unixfs ());
/* NWFS is known to have a broken FileBasicInformation info class.
It can't be used to fetch information, only to set information.
Therefore, for NWFS we have to fallback to the
/* NWFS/NcFsd is known to have a broken FileBasicInformation info
class. It can't be used to fetch information, only to set
information. Therefore, for NWFS we have to fallback to the
FileNetworkOpenInformation info class. Unfortunately we can't
use FileNetworkOpenInformation all the time since that fails on
other filesystems like NFS.
UNUSED, but keep in for information purposes. */
has_buggy_basic_info (is_nwfs ());
/* Netapp and NWFS are too dumb to allow non-DOS filenames
has_buggy_basic_info (is_nwfs () || is_ncfsd ());
/* Netapp and NWFS/NcFsd 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. */
has_dos_filenames_only (is_netapp () || is_nwfs () || is_cifs ());
has_dos_filenames_only (is_netapp () || is_nwfs ()
|| is_ncfsd () || is_cifs ());
/* NWFS does not grok re-opening a file by handle. It only
supports this if the filename is non-null and the handle is
the handle to a directory. */
the handle to a directory. NcFsd IR10 is supposed to be ok. */
has_buggy_reopen (is_nwfs ());
}
}
@ -1584,7 +1587,8 @@ fs_names_t fs_names[] = {
{ "unixfs", false },
{ "mvfs", false },
{ "cifs", false },
{ "nwfs", false }
{ "nwfs", false },
{ "ncfsd", false }
};
static mntent *

View File

@ -1,7 +1,7 @@
/* mount.h: mount definitions.
Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
@ -28,6 +28,7 @@ enum fs_info_type
mvfs,
cifs,
nwfs,
ncfsd,
/* Always last. */
max_fs_type
};
@ -97,6 +98,7 @@ class fs_info
IMPLEMENT_FS_FLAG (mvfs)
IMPLEMENT_FS_FLAG (cifs)
IMPLEMENT_FS_FLAG (nwfs)
IMPLEMENT_FS_FLAG (ncfsd)
fs_info_type what_fs () const { return status.fs_type; }
ULONG serial_number () const { return sernum; }

View File

@ -325,6 +325,7 @@ class path_conv
bool fs_is_mvfs () const {return fs.is_mvfs ();}
bool fs_is_cifs () const {return fs.is_cifs ();}
bool fs_is_nwfs () const {return fs.is_nwfs ();}
bool fs_is_ncfsd () const {return fs.is_ncfsd ();}
ULONG fs_serial_number () const {return fs.serial_number ();}
inline const char *set_path (const char *p)
{

View File

@ -723,7 +723,8 @@ unlink_nt (path_conv &pc)
error 59, ERROR_UNEXP_NET_ERR when trying to access the file.
Microsoft KB 837665 describes this problem as a bug in 2K3, but
I have reproduced it on other systems. */
if (status == STATUS_CANNOT_DELETE && !pc.isremote ())
if (status == STATUS_CANNOT_DELETE
&& (!pc.isremote () || pc.fs_is_ncfsd ()))
{
HANDLE fh2;