[Ocfs2-commits] jlbec commits r974 - in trunk/src: . inc
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Jun 2 14:51:19 CDT 2004
Author: jlbec
Date: 2004-06-02 13:51:17 -0500 (Wed, 02 Jun 2004)
New Revision: 974
Modified:
trunk/src/alloc.c
trunk/src/extmap.c
trunk/src/file.c
trunk/src/inc/ocfs.h
trunk/src/inode.c
trunk/src/namei.c
trunk/src/sysfile.c
Log:
o fe->local_ext is dead.
Modified: trunk/src/alloc.c
===================================================================
--- trunk/src/alloc.c 2004-06-02 18:40:55 UTC (rev 973)
+++ trunk/src/alloc.c 2004-06-02 18:51:17 UTC (rev 974)
@@ -919,7 +919,6 @@
OcfsExtent->alloc_file_off = fileOffset;
OcfsExtent->alloc_node = osb->node_num;
OcfsExtent->next_data_ext = 0;
- fe->local_ext = 0;
fe->granularity++;
LOG_TRACE_ARGS ("Granularity is: %d\n", fe->granularity);
@@ -927,8 +926,7 @@
OCFS_BH_PUT_DATA(bhs[0]);
/* If granularity is zero now, the for loop will not execute. */
- /* First time a file is created ,granularity = -1 and local_ext flag */
- /* is set to true */
+ /* First time a file is created, granularity = -1 */
upHeaderPtr = fe->this_sector;
@@ -1087,7 +1085,6 @@
}
/* Update the File Entry Extent */
- fe->local_ext = 0;
LOG_TRACE_ARGS("fe->alloc_size = %llu\n", fe->alloc_size);
fe->extents[0].file_off = 0;
@@ -1135,7 +1132,7 @@
goto finally;
}
- if (FileEntry->local_ext) {
+ if (FileEntry->granularity < 0) {
LOG_TRACE_STR("Using local extents");
/* We are still using the local extents of File Entry */
if (FileEntry->next_free_ext > OCFS_MAX_FILE_ENTRY_EXTENTS) {
@@ -1146,7 +1143,7 @@
k = FileEntry->next_free_ext - 1;
if (k >= 0 && OCFS_EXTENT_MERGEABLE (&FileEntry->extents[k], actualDiskOffset)) {
/* See if we can merge the extents and just increase the length */
- LOG_TRACE_ARGS ("Using local_ext for extent Entry = %u\n", k);
+ LOG_TRACE_ARGS ("Using local extent for extent Entry = %u\n", k);
FileEntry->extents[k].num_bytes += actualLength;
goto finally;
}
@@ -1188,7 +1185,7 @@
}
k = extent->next_free_ext - 1;
- LOG_TRACE_ARGS ("Using local_ext for extent Entry = %u\n", k);
+ LOG_TRACE_ARGS ("Using local extent for extent Entry = %u\n", k);
if (extent->next_free_ext < 1)
LOG_ERROR_ARGS ("next_free_ext=%d", extent->next_free_ext);
@@ -2302,7 +2299,7 @@
alloc_size = FileEntry->alloc_size;
/* local extents */
- if (FileEntry->local_ext) {
+ if (FileEntry->granularity < 0) {
status = _squish_extent_entries(osb, FileEntry->extents,
&FileEntry->next_free_ext,
handle, alloc_size, 0,
@@ -2373,7 +2370,6 @@
if (alloc_size == 0) {
FileEntry->last_ext_ptr = 0;
FileEntry->granularity = -1;
- FileEntry->local_ext = 1;
updated_lep = 1;
}
@@ -2458,7 +2454,7 @@
goto finally;
}
- if (fe->local_ext) {
+ if (fe->granularity < 0) {
status = ocfs_update_extent_map (osb, &OCFS_I(inode)->map, fe,
NULL, NULL, LOCAL_EXT);
if (status < 0) {
@@ -3087,7 +3083,7 @@
fe = (ocfs_file_entry *)OCFS_BH_GET_DATA_READ(fe_bh); /* read */
- if (fe->local_ext) {
+ if (fe->granularity < 0) {
for (i = 0; i < fe->next_free_ext; i++) {
numBitsAllocated = (__u32) (fe->extents[i].num_bytes >>
osb->cluster_size_bits);
Modified: trunk/src/extmap.c
===================================================================
--- trunk/src/extmap.c 2004-06-02 18:40:55 UTC (rev 973)
+++ trunk/src/extmap.c 2004-06-02 18:51:17 UTC (rev 974)
@@ -596,7 +596,7 @@
if (Flag == LOCAL_EXT) {
FileEntry = (ocfs_file_entry *) Buffer;
- OCFS_ASSERT (FileEntry->local_ext);
+ OCFS_ASSERT(FileEntry->granularity < 0);
for (j = 0; j < FileEntry->next_free_ext; j++) {
tempVbo = FileEntry->extents[j].file_off;
Modified: trunk/src/file.c
===================================================================
--- trunk/src/file.c 2004-06-02 18:40:55 UTC (rev 973)
+++ trunk/src/file.c 2004-06-02 18:51:17 UTC (rev 974)
@@ -454,7 +454,7 @@
if (fe->attribs & OCFS_ATTRIB_DIRECTORY)
goto leave;
- if (fe->local_ext) {
+ if (fe->granularity < 0) {
for (j = 0; j < fe->next_free_ext; j++) {
tempVbo = fe->extents[j].file_off;
tempLbo = fe->extents[j].disk_off;
Modified: trunk/src/inc/ocfs.h
===================================================================
--- trunk/src/inc/ocfs.h 2004-06-02 18:40:55 UTC (rev 973)
+++ trunk/src/inc/ocfs.h 2004-06-02 18:51:17 UTC (rev 974)
@@ -1333,7 +1333,6 @@
{
ocfs_disk_lock disk_lock; // DISKLOCK
__u8 signature[8]; // CHAR[8]
- __u32 local_ext; // BOOL
__u8 next_free_ext; // NUMBER RANGE(0,OCFS_MAX_FILE_ENTRY_EXTENTS)
__s8 next_del; // DIRNODEINDEX
__s32 granularity; // NUMBER RANGE(-1,3)
Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c 2004-06-02 18:40:55 UTC (rev 973)
+++ trunk/src/inode.c 2004-06-02 18:51:17 UTC (rev 974)
@@ -1926,7 +1926,7 @@
break;
}
- if (fe->local_ext) {
+ if (fe->granularity < 0) {
__s64 tempVbo;
__s64 tempLbo;
__u64 tempSize;
Modified: trunk/src/namei.c
===================================================================
--- trunk/src/namei.c 2004-06-02 18:40:55 UTC (rev 973)
+++ trunk/src/namei.c 2004-06-02 18:51:17 UTC (rev 974)
@@ -396,7 +396,6 @@
else
fe->link_cnt = 1;
- fe->local_ext = 1;
fe->granularity = -1;
fe->next_free_ext = 0;
fe->last_ext_ptr = 0;
Modified: trunk/src/sysfile.c
===================================================================
--- trunk/src/sysfile.c 2004-06-02 18:40:55 UTC (rev 973)
+++ trunk/src/sysfile.c 2004-06-02 18:51:17 UTC (rev 974)
@@ -403,7 +403,7 @@
goto leave;
}
- if (fe->local_ext)
+ if (fe->granularity < 0)
{
size = OCFS_MAX_FILE_ENTRY_EXTENTS * sizeof (ocfs_io_runs);
}
@@ -447,7 +447,7 @@
Runoffset = 0;
newOffset = file_off;
- if (fe->local_ext) {
+ if (fe->granularity < 0) {
for (j = 0; j < OCFS_MAX_FILE_ENTRY_EXTENTS; j++) {
if ((fe->extents[j].file_off +
fe->extents[j].num_bytes) > newOffset) {
More information about the Ocfs2-commits
mailing list