Module Name:    src
Committed By:   msaitoh
Date:           Mon Dec 22 03:32:23 UTC 2014

Modified Files:
        src/sys/ufs/ufs [netbsd-7]: extattr.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.28.1 src/sys/ufs/ufs/extattr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ufs/ufs/extattr.h
diff -u src/sys/ufs/ufs/extattr.h:1.10 src/sys/ufs/ufs/extattr.h:1.10.28.1
--- src/sys/ufs/ufs/extattr.h:1.10	Sun Oct  9 21:15:34 2011
+++ src/sys/ufs/ufs/extattr.h	Mon Dec 22 03:32:23 2014
@@ -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

Reply via email to