[PATCH 2/6] chunkd: change the prefix length of object pathname from 4 to 3

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

 



The volume directory may have 2^16 (=65536) directories because
prefix length of object pathname is 4 bytes. But ext3 filesystem can
only have EXT_LINK_MAX (32000) directories.

This changes the prefix length from 4 bytes to 3 bytes and breaks
the volume data format compatibility with older version.

Now the maximum count of links in volume directory is 2^12 (=4096)
and it doesn't exceed ext3's upper limit of max links.

Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
---
 server/be-fs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/be-fs.c b/server/be-fs.c
index aa8f008..512e33f 100644
--- a/server/be-fs.c
+++ b/server/be-fs.c
@@ -204,7 +204,7 @@ static struct fs_obj *fs_obj_alloc(void)
 	return obj;
 }
 
-#define PREFIX_LEN 4
+#define PREFIX_LEN 3
 
 static char *fs_obj_pathname(uint32_t table_id,const void *key, size_t key_len)
 {
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux