Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/ufs/ufs Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/8714854a36c3
branches:  netbsd-7
changeset: 798738:8714854a36c3
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Dec 22 03:32:23 2014 +0000

description:
Pull up following revision(s) (requested by manu in ticket #350):
        sys/ufs/ufs/extattr.h: revision 1.11
Bump UFS1 extended attribute max name length to 256
For extended attribute name max length, kernel filesystem-independant
code use either EXTATTR_MAXNAMELEN (BSD API) or XATTR_NAME_MAX (Linux
API),
which are both defined as KERNEL_NAME_MAX and fits Linux limit of 255
without training \0.
UFS1 code had a lower limit that broke Linux compatibility. We can bump
the limit without sacrifying backward compatibility, because:
1) There is no API exposing this limit outside the kernel. Upper kernel
layers have a larger limit handle the increase without a hitch
2) Each attribute has its own backing store in the fileystem, the name
of the backing store matching the attribute name. A newer kernel can
create/read/write backing store for longer attribute names and will
have no problem with existing shorter names.

diffstat:

 sys/ufs/ufs/extattr.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 6f99b4de2e93 -r 8714854a36c3 sys/ufs/ufs/extattr.h
--- a/sys/ufs/ufs/extattr.h     Mon Dec 22 03:28:32 2014 +0000
+++ b/sys/ufs/ufs/extattr.h     Mon Dec 22 03:32:23 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extattr.h,v 1.10 2011/10/09 21:15:34 chs Exp $ */
+/*     $NetBSD: extattr.h,v 1.10.28.1 2014/12/22 03:32:23 msaitoh Exp $        */
 
 /*-
  * Copyright (c) 1999-2001 Robert N. M. Watson
@@ -43,7 +43,7 @@
 #define        UFS_EXTATTR_FSROOTSUBDIR        ".attribute"
 #define        UFS_EXTATTR_SUBDIR_SYSTEM       "system"
 #define        UFS_EXTATTR_SUBDIR_USER         "user"
-#define        UFS_EXTATTR_MAXEXTATTRNAME      65      /* including null */
+#define        UFS_EXTATTR_MAXEXTATTRNAME      256     /* including null */
 
 #define        UFS_EXTATTR_ATTR_FLAG_INUSE     0x00000001      /* attr has been set */
 #define        UFS_EXTATTR_PERM_KERNEL         0x00000000



Home | Main Index | Thread Index | Old Index