[Ocfs2-commits] jlbec commits r1061 - branches/format-changes/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Sat Jun 12 02:39:59 CDT 2004
Author: jlbec
Date: 2004-06-12 01:39:57 -0500 (Sat, 12 Jun 2004)
New Revision: 1061
Modified:
branches/format-changes/src/dir.c
branches/format-changes/src/namei.c
branches/format-changes/src/ocfs.h
branches/format-changes/src/ocfs2_fs.h
branches/format-changes/src/ocfs_journal.h
branches/format-changes/src/proc.c
branches/format-changes/src/super.c
Log:
o Cleaned up ocfs.h some. Deleted some unused #defines. Removed the
dir_alloc stuff from osb.
o Moved directory structures to ocfs2_fs.h
Modified: branches/format-changes/src/dir.c
===================================================================
--- branches/format-changes/src/dir.c 2004-06-12 06:05:22 UTC (rev 1060)
+++ branches/format-changes/src/dir.c 2004-06-12 06:39:57 UTC (rev 1061)
@@ -114,7 +114,7 @@
* failure will be detected in the
* dirent test below. */
if (le16_to_cpu(de->rec_len) <
- OCFS_DIR_REC_LEN(1))
+ OCFS2_DIR_REC_LEN(1))
break;
i += le16_to_cpu(de->rec_len);
}
@@ -151,7 +151,7 @@
unsigned long version = filp->f_version;
unsigned char d_type = DT_UNKNOWN;
- if (de->file_type < OCFS_FT_MAX)
+ if (de->file_type < OCFS2_FT_MAX)
d_type = ocfs_filetype_table[de->file_type];
error = filldir(dirent, de->name,
de->name_len,
@@ -260,7 +260,8 @@
int err;
sb = inode->i_sb;
- if (inode->i_size < OCFS_DIR_REC_LEN(1) + OCFS_DIR_REC_LEN(2) ||
+ if ((inode->i_size <
+ (OCFS2_DIR_REC_LEN(1) + OCFS2_DIR_REC_LEN(2))) ||
!(bh = ocfs_bread (NULL, inode, 0, 0, &err, 0))) {
LOG_ERROR_ARGS ("bad directory (dir #%llu) - no data block\n",
GET_INODE_FEOFF(inode));
Modified: branches/format-changes/src/namei.c
===================================================================
--- branches/format-changes/src/namei.c 2004-06-12 06:05:22 UTC (rev 1060)
+++ branches/format-changes/src/namei.c 2004-06-12 06:39:57 UTC (rev 1061)
@@ -126,7 +126,7 @@
LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", dir, dentry,
dentry->d_name.len, dentry->d_name.name);
- if (dentry->d_name.len > OCFS_MAX_FILENAME_LENGTH) {
+ if (dentry->d_name.len > OCFS2_MAX_FILENAME_LENGTH) {
LOG_ERROR_STR ("name too long");
ret = ERR_PTR (-ENAMETOOLONG);
goto bail;
@@ -269,12 +269,14 @@
de = OCFS_BH_GET_DATA_WRITE(newdirbh);
de->inode = cpu_to_le64(file_off);
de->name_len = 1;
- de->rec_len = cpu_to_le16(OCFS_DIR_REC_LEN(de->name_len));
+ de->rec_len =
+ cpu_to_le16(OCFS2_DIR_REC_LEN(de->name_len));
strcpy (de->name, ".");
ocfs_set_de_type(dir->i_sb, de, S_IFDIR);
de = (struct ocfs2_dir_entry *) ((char *) de + le16_to_cpu(de->rec_len));
de->inode = cpu_to_le64(GET_INODE_FEOFF(dir));
- de->rec_len = cpu_to_le16(inode->i_sb->s_blocksize-OCFS_DIR_REC_LEN(1));
+ de->rec_len = cpu_to_le16(inode->i_sb->s_blocksize -
+ OCFS2_DIR_REC_LEN(1));
de->name_len = 2;
strcpy (de->name, "..");
ocfs_set_de_type(dir->i_sb, de, S_IFDIR);
@@ -1023,7 +1025,7 @@
goto finally;
status = -EMLINK;
if (!new_inode && new_dir!=old_dir &&
- new_dir->i_nlink >= OCFS_LINK_MAX)
+ new_dir->i_nlink >= OCFS2_LINK_MAX)
goto finally;
}
@@ -1430,11 +1432,11 @@
const char * error_msg = NULL;
const int rlen = le16_to_cpu(de->rec_len);
- if (rlen < OCFS_DIR_REC_LEN(1))
+ if (rlen < OCFS2_DIR_REC_LEN(1))
error_msg = "rec_len is smaller than minimal";
else if (rlen % 4 != 0)
error_msg = "rec_len % 4 != 0";
- else if (rlen < OCFS_DIR_REC_LEN(de->name_len))
+ else if (rlen < OCFS2_DIR_REC_LEN(de->name_len))
error_msg = "rec_len is too small for name_len";
else if (((char *) de - bh->b_data) + rlen > dir->i_sb->s_blocksize)
error_msg = "directory entry across blocks";
@@ -1480,7 +1482,7 @@
bh = ocfs_bread (handle, dir, 0, 0, &retval, 0);
if (!bh)
return retval;
- rec_len = OCFS_DIR_REC_LEN(namelen);
+ rec_len = OCFS2_DIR_REC_LEN(namelen);
offset = 0;
de = (struct ocfs2_dir_entry *) bh->b_data;
while (1) {
@@ -1533,8 +1535,10 @@
retval = -EEXIST;
goto bail;
}
- if ((le64_to_cpu(de->inode) == 0 && le16_to_cpu(de->rec_len) >= rec_len) ||
- (le16_to_cpu(de->rec_len) >= OCFS_DIR_REC_LEN(de->name_len) + rec_len)) {
+ if (((le64_to_cpu(de->inode) == 0) &&
+ (le16_to_cpu(de->rec_len) >= rec_len)) ||
+ (le16_to_cpu(de->rec_len) >=
+ (OCFS2_DIR_REC_LEN(de->name_len) + rec_len))) {
OCFS_BH_PUT_DATA(bh);
buf = NULL;
status = ocfs_journal_access(handle, bh, OCFS_JOURNAL_ACCESS_WRITE);
@@ -1543,14 +1547,14 @@
offset += le16_to_cpu(de->rec_len);
if (le64_to_cpu(de->inode)) {
de1 = (struct ocfs2_dir_entry *) ((char *) de +
- OCFS_DIR_REC_LEN(de->name_len));
+ OCFS2_DIR_REC_LEN(de->name_len));
de1->rec_len =
cpu_to_le16(le16_to_cpu(de->rec_len) -
- OCFS_DIR_REC_LEN(de->name_len));
- de->rec_len = cpu_to_le16(OCFS_DIR_REC_LEN(de->name_len));
+ OCFS2_DIR_REC_LEN(de->name_len));
+ de->rec_len = cpu_to_le16(OCFS2_DIR_REC_LEN(de->name_len));
de = de1;
}
- de->file_type = OCFS_FT_UNKNOWN;
+ de->file_type = OCFS2_FT_UNKNOWN;
if (inode_off) {
de->inode = cpu_to_le64(inode_off);
ocfs_set_de_type(dir->i_sb, de, inode->i_mode);
@@ -1786,14 +1790,14 @@
LOG_ENTRY_ARGS("(inode->i_ino = %lu)\n", inode->i_ino);
/* create a unique name here. */
- name = kmalloc(OCFS_MAX_FILENAME_LENGTH+1, GFP_KERNEL);
+ name = kmalloc(OCFS2_MAX_FILENAME_LENGTH+1, GFP_KERNEL);
if (!name) {
status = -EFAIL;
LOG_ERROR_STATUS(status);
goto leave;
}
- namelen = snprintf(name, OCFS_MAX_FILENAME_LENGTH+1, "%llu",
+ namelen = snprintf(name, OCFS2_MAX_FILENAME_LENGTH+1, "%llu",
GET_INODE_FEOFF(inode));
if (namelen <= 0) {
if (namelen)
@@ -1885,14 +1889,14 @@
struct buffer_head *target_de_bh;
struct ocfs2_dir_entry *target_de = NULL;
- name = kmalloc(OCFS_MAX_FILENAME_LENGTH+1, GFP_KERNEL);
+ name = kmalloc(OCFS2_MAX_FILENAME_LENGTH+1, GFP_KERNEL);
if (!name) {
status = -EFAIL;
LOG_ERROR_STATUS(status);
goto leave;
}
- namelen = snprintf(name, OCFS_MAX_FILENAME_LENGTH+1, "%llu",
+ namelen = snprintf(name, OCFS2_MAX_FILENAME_LENGTH+1, "%llu",
GET_INODE_FEOFF(inode));
if (namelen <= 0) {
if (namelen)
@@ -1966,7 +1970,7 @@
if (S_ISDIR(inode->i_mode))
return -EPERM;
- if (inode->i_nlink >= OCFS_LINK_MAX)
+ if (inode->i_nlink >= OCFS2_LINK_MAX)
return -EMLINK;
#define OCFS_DATA_TRANS_BLOCKS (3 * 8 - 2)
Modified: branches/format-changes/src/ocfs.h
===================================================================
--- branches/format-changes/src/ocfs.h 2004-06-12 06:05:22 UTC (rev 1060)
+++ branches/format-changes/src/ocfs.h 2004-06-12 06:39:57 UTC (rev 1061)
@@ -148,8 +148,6 @@
#define MISS_COUNT_VALUE 30
-#define OCFS_DEFAULT_DIR_NODE_SECTS (256)
-#define OCFS_DEFAULT_DIR_NODE_SIZE (512 * OCFS_DEFAULT_DIR_NODE_SECTS)
#define OCFS_DEFAULT_FILE_NODE_SIZE (512)
#define OCFS_DEFAULT_INODE_SIZE (512)
@@ -228,7 +226,6 @@
#define OCFS_SECTOR_SIZE 512
#define OCFS_MAXIMUM_NODES 32
-#define OCFS_MAX_FILENAME_LENGTH 255
#define OCFS_MAX_OSB_ID 65536
@@ -280,9 +277,6 @@
/* lockres->lock_state flags */
-#define FLAG_ALWAYS_UPDATE_OPEN 0x00000001
-#define LOCK_STATE_INIT 0x00000002
-#define LOCK_STATE_IN_VOTING 0x00000004
#define FLAG_READONLY_DROPPING 0x00000008
/* osb->osb_flags flags */
@@ -313,23 +307,8 @@
#define FLAG_VOTE_UPDATE_RETRY 0x8
#define FLAG_VOTE_FILE_DEL 0x10
-/*
-** File Entry contains this information
-*/
-/* OCFS2 file flags */
-#define OCFS2_VALID_FL (0x01)
-#define OCFS2_UNUSED2_FL (0x02)
-#define OCFS2_ORPHANED_FL (0x04)
-#define OCFS2_UNUSED3_FL (0x08)
-#define OCFS2_SYSTEM_FL (0x10)
-#define OCFS2_SUPER_FL (0x11)
-#define OCFS2_ALLOC_FL (0x12)
-#define OCFS2_BITMAP_FL (0x14)
-
#define INVALID_NODE_POINTER -1
-#define OCFS2_FILE_ENTRY_SIGNATURE "INODE01"
-#define OCFS2_EXTENT_BLOCK_SIGNATURE "EXBLK01"
#define OCFS_LOCAL_ALLOC_SIGNATURE "LCLBMP"
#define MAX_IP_ADDR_LEN 32
@@ -452,7 +431,7 @@
#define ocfs_free_extent_entry(ext) kmem_cache_free(OcfsGlobalCtxt.extent_cache, ext)
-#define OCFS_NAME "OCFS"
+#define OCFS_NAME "OCFS2"
/* ioctl commands */
#define OCFS_IOC_MAGIC 'O'
@@ -488,7 +467,6 @@
#endif /* >= 2.6.0 */
#define OCFS_SB(sb) ((ocfs_super *)OCFS_GENERIC_SB_MEMBER(sb))
-#define OCFS2_RAW_SB(inode) (inode->id2.i_super)
#define OCFS_MINOR_VERSION (0)
@@ -590,8 +568,6 @@
__u64 num_nodes; // NUMBER RANGE(0,32)
/* Number of free clusters at format */
__u64 num_clusters; // NUMBER RANGE(0,ULONG_LONG_MAX)
- /* OCFS_DEFAULT_DIR_NODE_SIZE */
- __u64 dir_node_size; // NUMBER RANGE(0,ULONG_LONG_MAX)
/* OCFS_DEFAULT_FILE_NODE_SIZE */
__u64 file_node_size; // NUMBER RANGE(0,ULONG_LONG_MAX)
__u64 internal_off; // NUMBER RANGE(0,ULONG_LONG_MAX)
@@ -804,8 +780,6 @@
#define OCFS_I(i) ((ocfs_inode_private *)(i->u.generic_ip))
-#define DISK_LOCK(x) ((ocfs2_disk_lock *)&(x)->i_disk_lock)
-
#define GET_INODE_CLEAN_SEQ(i) (atomic_t *)(&(OCFS_I(i)->i_clean_buffer_seq))
@@ -991,14 +965,12 @@
__u32 sect_size_bits;
unsigned long s_clustersize;
int s_clustersize_bits;
- __u32 dir_alloc_bits;
__u32 file_alloc_bits;
__u32 inode_alloc_bits;
__u32 inode_size;
int needs_flush;
ocfs_alloc_bm cluster_bitmap;
- __u32 max_dir_node_ent;
ocfs_vol_state vol_state;
struct semaphore recovery_lock;
spinlock_t recovery_map_lock;
@@ -1353,52 +1325,6 @@
char nodename[255]; /* node name */
};
-/*
- * ocfs directory file types. Only the low 3 bits are used. The
- * other bits are reserved for now.
- */
-#define OCFS_FT_UNKNOWN 0
-#define OCFS_FT_REG_FILE 1
-#define OCFS_FT_DIR 2
-#define OCFS_FT_CHRDEV 3
-#define OCFS_FT_BLKDEV 4
-#define OCFS_FT_FIFO 5
-#define OCFS_FT_SOCK 6
-#define OCFS_FT_SYMLINK 7
-
-#define OCFS_FT_MAX 8
-
-/*
- * OCFS_DIR_PAD defines the directory entries boundaries
- *
- * NOTE: It must be a multiple of 4
- */
-#define OCFS_DIR_PAD 4
-#define OCFS_DIR_ROUND (OCFS_DIR_PAD - 1)
-#define OCFS_DIR_REC_LEN(name_len) (((name_len) + 12 + OCFS_DIR_ROUND) & \
- ~OCFS_DIR_ROUND)
-#define OCFS_LINK_MAX 32000
-
-
-struct ocfs2_dir_entry {
- __u64 inode; /* Inode number */
- __u16 rec_len; /* Directory entry length */
- __u8 name_len; /* Name length */
- __u8 file_type;
- char name[OCFS_MAX_FILENAME_LENGTH]; /* File name */
-};
-
-#define S_SHIFT 12
-static unsigned char ocfs_type_by_mode[S_IFMT >> S_SHIFT] = {
- [S_IFREG >> S_SHIFT] OCFS_FT_REG_FILE,
- [S_IFDIR >> S_SHIFT] OCFS_FT_DIR,
- [S_IFCHR >> S_SHIFT] OCFS_FT_CHRDEV,
- [S_IFBLK >> S_SHIFT] OCFS_FT_BLKDEV,
- [S_IFIFO >> S_SHIFT] OCFS_FT_FIFO,
- [S_IFSOCK >> S_SHIFT] OCFS_FT_SOCK,
- [S_IFLNK >> S_SHIFT] OCFS_FT_SYMLINK,
-};
-
/* timeout structure taken from Ben's aio.c */
typedef struct _ocfs_timeout {
struct timer_list timer;
@@ -1675,27 +1601,6 @@
return (u32)(blocks >> b_to_c_bits);
}
-static inline int ocfs_extent_recs_per_inode(struct super_block *sb)
-{
- int size;
-
- size = sb->s_blocksize -
- offsetof(struct _ocfs2_dinode, id2.i_list.l_recs);
-
- return size / sizeof(struct _ocfs2_extent_rec);
-}
-
-static inline int ocfs_extent_recs_per_eb(struct super_block *sb)
-{
- int size;
-
- size = sb->s_blocksize -
- offsetof(struct _ocfs2_extent_block, h_list.l_recs);
-
- return size / sizeof(struct _ocfs2_extent_rec);
-}
-
-
typedef struct _ocfs_journal_handle ocfs_journal_handle;
#endif /* !OCFS_H */
Modified: branches/format-changes/src/ocfs2_fs.h
===================================================================
--- branches/format-changes/src/ocfs2_fs.h 2004-06-12 06:05:22 UTC (rev 1060)
+++ branches/format-changes/src/ocfs2_fs.h 2004-06-12 06:39:57 UTC (rev 1061)
@@ -1,5 +1,96 @@
+/*
+ * ocfs2_fs.h
+ *
+ * On-disk structures for OCFS2.
+ *
+ * Copyright (C) 2002, 2004 Oracle. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License, version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ *
+ * Authors: Kurt Hackel, Mark Fasheh, Sunil Mushran, Wim Coekaerts,
+ * Manish Singh, Neeraj Goyal, Suchit Kaura, Joel Becker
+ */
+#ifndef _OCFS2_FS_H
+#define _OCFS2_FS_H
+
+/* Object signatures */
+#define OCFS2_FILE_ENTRY_SIGNATURE "INODE01"
+#define OCFS2_EXTENT_BLOCK_SIGNATURE "EXBLK01"
+
/*
+ * Flags on ocfs2_dinode.i_flags
+ */
+#define OCFS2_VALID_FL (0x01)
+#define OCFS2_UNUSED2_FL (0x02)
+#define OCFS2_ORPHANED_FL (0x04)
+#define OCFS2_UNUSED3_FL (0x08)
+#define OCFS2_SYSTEM_FL (0x10)
+#define OCFS2_SUPER_FL (0x11)
+#define OCFS2_ALLOC_FL (0x12)
+#define OCFS2_BITMAP_FL (0x14)
+
+#define OCFS2_MAX_FILENAME_LENGTH 255
+
+/*
+ * OCFS2 directory file types. Only the low 3 bits are used. The
+ * other bits are reserved for now.
+ */
+#define OCFS2_FT_UNKNOWN 0
+#define OCFS2_FT_REG_FILE 1
+#define OCFS2_FT_DIR 2
+#define OCFS2_FT_CHRDEV 3
+#define OCFS2_FT_BLKDEV 4
+#define OCFS2_FT_FIFO 5
+#define OCFS2_FT_SOCK 6
+#define OCFS2_FT_SYMLINK 7
+
+#define OCFS2_FT_MAX 8
+
+/*
+ * OCFS2_DIR_PAD defines the directory entries boundaries
+ *
+ * NOTE: It must be a multiple of 4
+ */
+#define OCFS2_DIR_PAD 4
+#define OCFS2_DIR_ROUND (OCFS2_DIR_PAD - 1)
+#define OCFS2_DIR_REC_LEN(name_len) (((name_len) + 12 + \
+ OCFS2_DIR_ROUND) & \
+ ~OCFS2_DIR_ROUND)
+#define OCFS2_LINK_MAX 32000
+
+#define S_SHIFT 12
+static unsigned char ocfs_type_by_mode[S_IFMT >> S_SHIFT] = {
+ [S_IFREG >> S_SHIFT] OCFS2_FT_REG_FILE,
+ [S_IFDIR >> S_SHIFT] OCFS2_FT_DIR,
+ [S_IFCHR >> S_SHIFT] OCFS2_FT_CHRDEV,
+ [S_IFBLK >> S_SHIFT] OCFS2_FT_BLKDEV,
+ [S_IFIFO >> S_SHIFT] OCFS2_FT_FIFO,
+ [S_IFSOCK >> S_SHIFT] OCFS2_FT_SOCK,
+ [S_IFLNK >> S_SHIFT] OCFS2_FT_SYMLINK,
+};
+
+
+/*
+ * Convenience casts
+ */
+#define OCFS2_RAW_SB(inode) (inode->id2.i_super)
+#define DISK_LOCK(x) ((ocfs2_disk_lock *)&(x)->i_disk_lock)
+
+
+/*
* On disk extent record for OCFS2. It describes a range of clusters
* on disk.
*/
@@ -11,7 +102,10 @@
} ocfs2_extent_rec;
/*
- * On disk extent list for OCFS2 (node in the tree)
+ * On disk extent list for OCFS2 (node in the tree). Note that this
+ * is contained inside ocfs2_dinode or ocfs2_extent_block, so the
+ * offsets are relative to ocfs2_dinode.id2.i_list or
+ * ocfs2_extent_block.h_list, respectively.
*/
typedef struct _ocfs2_extent_list {
/*00*/ __s16 l_tree_depth; /* Extent tree depth from this
@@ -46,6 +140,7 @@
of next leaf header pointing
to data */
/*30*/ ocfs2_extent_list h_list; /* Extent record list */
+/* Actual on-disk size is one block */
} ocfs2_extent_block;
/*
@@ -140,5 +235,37 @@
ocfs2_super_block i_super;
ocfs2_extent_list i_list;
} id2;
+/* Actual on-disk size is one block */
} ocfs2_dinode;
+struct ocfs2_dir_entry {
+/*00*/ __u64 inode; /* Inode number */
+ __u16 rec_len; /* Directory entry length */
+ __u8 name_len; /* Name length */
+ __u8 file_type;
+/*0C*/ char name[OCFS2_MAX_FILENAME_LENGTH]; /* File name */
+/* Actual on-disk length specified by rec_len */
+};
+
+
+static inline int ocfs_extent_recs_per_inode(struct super_block *sb)
+{
+ int size;
+
+ size = sb->s_blocksize -
+ offsetof(struct _ocfs2_dinode, id2.i_list.l_recs);
+
+ return size / sizeof(struct _ocfs2_extent_rec);
+}
+
+static inline int ocfs_extent_recs_per_eb(struct super_block *sb)
+{
+ int size;
+
+ size = sb->s_blocksize -
+ offsetof(struct _ocfs2_extent_block, h_list.l_recs);
+
+ return size / sizeof(struct _ocfs2_extent_rec);
+}
+
+#endif /* _OCFS2_FS_H */
Modified: branches/format-changes/src/ocfs_journal.h
===================================================================
--- branches/format-changes/src/ocfs_journal.h 2004-06-12 06:05:22 UTC (rev 1060)
+++ branches/format-changes/src/ocfs_journal.h 2004-06-12 06:39:57 UTC (rev 1061)
@@ -321,7 +321,7 @@
* + a second dirnode for handling mkdir + 2 * 2 = 4 blocks for
* setting the bits in the dir alloc bitmap and the metadata alloc
* bitmap if dir alloc needs to be extended + some fuzz. */
-#define OCFS_MKNOD_CREDITS (1 + 1 + (OCFS_DEFAULT_DIR_NODE_SECTS*2) + \
+#define OCFS_MKNOD_CREDITS (1 + 1 + \
(OCFS_SINGLE_FILE_EXTEND_CREDITS * 4) + \
OCFS_JOURNAL_FUZZ_CREDITS)
@@ -368,8 +368,7 @@
/* fe change, locknode change, dirnode head, times two plus a possible
* delete, plus a possible dirnode addition in insert_file, and fuzz */
#define OCFS_FILE_RENAME_CREDITS (2 * (1 + 1 + 1) + OCFS_FILE_DELETE_CREDITS \
- + OCFS_JOURNAL_FUZZ_CREDITS + \
- OCFS_DEFAULT_DIR_NODE_SECTS)
+ + OCFS_JOURNAL_FUZZ_CREDITS)
/* On very rare open operations (it's a first open and we're not in
* the open map), we have to change the file entry. */
Modified: branches/format-changes/src/proc.c
===================================================================
--- branches/format-changes/src/proc.c 2004-06-12 06:05:22 UTC (rev 1060)
+++ branches/format-changes/src/proc.c 2004-06-12 06:39:57 UTC (rev 1061)
@@ -507,7 +507,6 @@
"Number of nodes : %u\n" \
"Cluster size : %u\n" \
"Volume size : %llu\n" \
- "Dir node size : %llu\n" \
"File node size : %llu\n" \
"Failed Large Allocs : %u\n" \
"Retry Large Allocs : %u\n" \
@@ -515,7 +514,7 @@
len = sprintf (page, PROC_STATS, osb->file_open_cnt, pubmap,
vol->num_nodes, vol->cluster_size, vol->size,
- vol->dir_node_size, vol->file_node_size,
+ vol->file_node_size,
osb->cluster_bitmap.failed,
osb->cluster_bitmap.ok_retries,
osb->inode_hash.num_ents);
Modified: branches/format-changes/src/super.c
===================================================================
--- branches/format-changes/src/super.c 2004-06-12 06:05:22 UTC (rev 1060)
+++ branches/format-changes/src/super.c 2004-06-12 06:39:57 UTC (rev 1061)
@@ -727,7 +727,7 @@
buf->f_type = OCFS_MAGIC;
buf->f_bsize = sb->s_blocksize;
- buf->f_namelen = OCFS_MAX_FILENAME_LENGTH;
+ buf->f_namelen = OCFS2_MAX_FILENAME_LENGTH;
buf->f_bavail = buf->f_bfree;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
buf->f_blocks =
@@ -1425,7 +1425,6 @@
vol_layout->data_start_off = vdh->data_start_off;
vol_layout->root_bitmap_size = vdh->root_bitmap_size;
vol_layout->num_clusters = vdh->num_clusters;
- vol_layout->dir_node_size = vdh->dir_node_size;
vol_layout->file_node_size = vdh->file_node_size;
vol_layout->node_cfg_off = vdh->node_cfg_off;
vol_layout->node_cfg_size = vdh->node_cfg_size;
@@ -1434,9 +1433,6 @@
memcpy (vol_layout->vol_id, vol_label->vol_id, MAX_VOL_ID_LENGTH);
- if (vol_layout->dir_node_size == 0)
- vol_layout->dir_node_size = OCFS_DEFAULT_DIR_NODE_SIZE;
-
if (vol_layout->file_node_size == 0)
vol_layout->file_node_size = OCFS_DEFAULT_FILE_NODE_SIZE;
@@ -1446,21 +1442,18 @@
osb->sect_size_bits = ocfs_get_right_shift_bits(sect_size);
osb->s_clustersize = vol_layout->cluster_size;
osb->s_clustersize_bits = ocfs_get_right_shift_bits(vol_layout->cluster_size);
- osb->dir_alloc_bits = ocfs_get_right_shift_bits(vol_layout->dir_node_size);
osb->file_alloc_bits = ocfs_get_right_shift_bits(vol_layout->file_node_size);
osb->inode_alloc_bits = ocfs_get_right_shift_bits(osb->inode_size);
- printk("sectbits=%d, clusterbits=%d, dirbits=%d, filebits=%d, inodebits=%d\n",
+ printk("sectbits=%d, clusterbits=%d, filebits=%d, inodebits=%d\n",
osb->sect_size_bits, osb->s_clustersize_bits,
- osb->dir_alloc_bits, osb->file_alloc_bits, osb->inode_alloc_bits);
+ osb->file_alloc_bits, osb->inode_alloc_bits);
OCFS_ASSERT(osb->sect_size_bits);
OCFS_ASSERT(osb->s_clustersize_bits);
- OCFS_ASSERT(osb->dir_alloc_bits);
OCFS_ASSERT(osb->file_alloc_bits);
OCFS_ASSERT(osb->inode_alloc_bits);
- osb->max_dir_node_ent = (__u32) (vol_layout->dir_node_size >> osb->sect_size_bits) - 2;
bitmap_bits = (__u32) vol_layout->num_clusters;
ocfs_initialize_bitmap (&osb->cluster_bitmap, bitmap_bits, ONE_MEGA_BYTE * 8);
More information about the Ocfs2-commits
mailing list