public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH, E2FSPROGS] On-disk format for large number of subdirectors
@ 2006-10-18  6:24 Theodore Ts'o
  2006-10-18 19:29 ` Andreas Dilger
  0 siblings, 1 reply; 2+ messages in thread
From: Theodore Ts'o @ 2006-10-18  6:24 UTC (permalink / raw)
  To: linux-ext4


Comments?

						- Ted


On-disk format for large number of subdirectories

- EXT4_FEATURE_RO_COMPAT_DIR_NLINK (0x0020?) - allow directories to have
  > 65000 subdirectories (i_nlinks) by setting i_nlinks = 1 for such
  directories.  RO_COMPAT protects old filesystems from unlinking such
  directories incorrectly and losing all files therein.  

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Index: e2fsprogs/lib/ext2fs/ext2_fs.h
===================================================================
--- e2fsprogs.orig/lib/ext2fs/ext2_fs.h	2006-10-18 01:42:48.000000000 -0400
+++ e2fsprogs/lib/ext2fs/ext2_fs.h	2006-10-18 01:49:51.000000000 -0400
@@ -71,7 +71,7 @@
 /*
  * Maximal count of links to a file
  */
-#define EXT2_LINK_MAX		32000
+#define EXT2_LINK_MAX		65000
 
 /*
  * Macro-instructions used to manage several block sizes
@@ -606,6 +606,7 @@
 /* #define EXT2_FEATURE_RO_COMPAT_BTREE_DIR	0x0004 not used */
 #define EXT4_FEATURE_RO_COMPAT_HUGE_FILE	0x0008
 #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM		0x0010
+#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
 
 #define EXT2_FEATURE_INCOMPAT_COMPRESSION	0x0001
 #define EXT2_FEATURE_INCOMPAT_FILETYPE		0x0002

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, E2FSPROGS] On-disk format for large number of subdirectors
  2006-10-18  6:24 [PATCH, E2FSPROGS] On-disk format for large number of subdirectors Theodore Ts'o
@ 2006-10-18 19:29 ` Andreas Dilger
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Dilger @ 2006-10-18 19:29 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: linux-ext4

On Oct 18, 2006  02:24 -0400, Theodore Ts'o wrote:
> On-disk format for large number of subdirectories
> 
> - EXT4_FEATURE_RO_COMPAT_DIR_NLINK (0x0020?) - allow directories to have
>   > 65000 subdirectories (i_nlinks) by setting i_nlinks = 1 for such
>   directories.  RO_COMPAT protects old filesystems from unlinking such
>   directories incorrectly and losing all files therein.  
> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Looks good.  Will try to get a new patch out with this support.

> Index: e2fsprogs/lib/ext2fs/ext2_fs.h
> ===================================================================
> --- e2fsprogs.orig/lib/ext2fs/ext2_fs.h	2006-10-18 01:42:48.000000000 -0400
> +++ e2fsprogs/lib/ext2fs/ext2_fs.h	2006-10-18 01:49:51.000000000 -0400
> @@ -71,7 +71,7 @@
>  /*
>   * Maximal count of links to a file
>   */
> -#define EXT2_LINK_MAX		32000
> +#define EXT2_LINK_MAX		65000
>  
>  /*
>   * Macro-instructions used to manage several block sizes
> @@ -606,6 +606,7 @@
>  /* #define EXT2_FEATURE_RO_COMPAT_BTREE_DIR	0x0004 not used */
>  #define EXT4_FEATURE_RO_COMPAT_HUGE_FILE	0x0008
>  #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM		0x0010
> +#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
>  
>  #define EXT2_FEATURE_INCOMPAT_COMPRESSION	0x0001
>  #define EXT2_FEATURE_INCOMPAT_FILETYPE		0x0002

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-18 19:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-18  6:24 [PATCH, E2FSPROGS] On-disk format for large number of subdirectors Theodore Ts'o
2006-10-18 19:29 ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox