This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin Filesystem Performance degradation 1.7.5 vs 1.7.7, and methods for improving performance


Hi,

use_acl patch (including use of CYGWIN env var)

Yoni.

Index: environ.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/environ.cc,v
retrieving revision 1.183
diff -u -p -r1.183 environ.cc
--- environ.cc	18 May 2010 14:30:50 -0000	1.183
+++ environ.cc	13 Oct 2010 15:06:15 -0000
@@ -34,6 +34,7 @@ details. */
 extern bool dos_file_warning;
 extern bool ignore_case_with_glob;
 extern bool allow_winsymlinks;
+extern bool use_acl;
 bool reset_com = false;
 static bool envcache = true;
 static bool create_upcaseenv = false;
@@ -605,6 +606,7 @@ static struct parse_thing
   {"tty", {NULL}, set_process_state, NULL, {{0}, {PID_USETTY}}},
   {"upcaseenv", {&create_upcaseenv}, justset, NULL, {{false}, {true}}},
   {"winsymlinks", {&allow_winsymlinks}, justset, NULL, {{false}, {true}}},
+  {"use_acl", {&use_acl}, justset, NULL, {{false}, {true}}},
   {NULL, {0}, justset, 0, {{0}, {0}}}
 };

@@ -616,6 +618,7 @@ parse_options (char *buf)
   int istrue;
   char *p, *lasts;
   parse_thing *k;
+  TCHAR exe_name[MAX_PATH];

if (buf == NULL)
{
@@ -694,6 +697,11 @@ parse_options (char *buf)
break;
}
}
+ if (GetModuleFileName(0, exe_name, MAX_PATH) && (strstr(exe_name, "chmod") ||
+ strstr(exe_name, "chown") || strstr(exe_name, "chgrp")))
+ {
+ use_acl = 1;
+ }
debug_printf ("returning");
}


Index: mount.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/mount.cc,v
retrieving revision 1.72
diff -u -p -r1.72 mount.cc
--- mount.cc	28 Sep 2010 14:49:31 -0000	1.72
+++ mount.cc	13 Oct 2010 15:06:16 -0000
@@ -48,6 +48,7 @@ details. */
 bool NO_COPY mount_info::got_usr_bin;
 bool NO_COPY mount_info::got_usr_lib;
 int NO_COPY mount_info::root_idx = -1;
+bool use_acl = true;

 /* is_unc_share: Return non-zero if PATH begins with //server/share
 		 or with one of the native prefixes //./ or //?/
@@ -163,6 +164,16 @@ fs_info_cache::add (uint32_t hashval, fs
   fsi_lock.release ();
 }

+bool fs_info::has_acls(bool val)
+{
+  return (bool) (status.has_acls = val);
+}
+
+bool fs_info::has_acls() const
+{
+  return use_acl ? status.has_acls : 0;
+}
+
 bool
 fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
 {
Index: mount.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/mount.h,v
retrieving revision 1.15
diff -u -p -r1.15 mount.h
--- mount.h	21 Sep 2010 16:32:22 -0000	1.15
+++ mount.h	13 Oct 2010 15:06:16 -0000
@@ -76,7 +76,8 @@ class fs_info
   IMPLEMENT_STATUS_FLAG (ULONG, samba_version)
   IMPLEMENT_STATUS_FLAG (ULONG, name_len)
   IMPLEMENT_STATUS_FLAG (bool, is_remote_drive)
-  IMPLEMENT_STATUS_FLAG (bool, has_acls)
+  bool has_acls(bool val);
+  bool has_acls() const;
   IMPLEMENT_STATUS_FLAG (bool, hasgood_inode)
   IMPLEMENT_STATUS_FLAG (bool, caseinsensitive)
   IMPLEMENT_STATUS_FLAG (bool, has_buggy_open)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]