[Ocfs2-commits] wcoekaer commits r1368 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Aug 20 17:36:03 CDT 2004
Author: wcoekaer
Date: 2004-08-20 16:36:01 -0500 (Fri, 20 Aug 2004)
New Revision: 1368
Modified:
trunk/src/extmap.c
trunk/src/extmap.h
trunk/src/file.c
Log:
fix bug in setattr on truncate
remove delete_extent_maps function and declaration
Modified: trunk/src/extmap.c
===================================================================
--- trunk/src/extmap.c 2004-08-20 20:02:42 UTC (rev 1367)
+++ trunk/src/extmap.c 2004-08-20 21:36:01 UTC (rev 1368)
@@ -474,36 +474,6 @@
/*
- * ocfs_delete_all_extent_maps()
- *
- */
-void ocfs_delete_all_extent_maps (ocfs_super *osb, struct inode * inode)
-{
- __u32 RunsInExtentMap = 0, ExtentMapIndex, ByteCount = 0;
- __s64 Vbo;
- __s64 Lbo;
-
- LOG_ENTRY ();
-
- RunsInExtentMap = OCFS_I(inode)->ip_ext_map.count;
-
- for (ExtentMapIndex = 0; ExtentMapIndex < RunsInExtentMap;
- ExtentMapIndex++) {
- if (ocfs_get_next_extent_map_entry
- (osb, &OCFS_I(inode)->ip_ext_map, ExtentMapIndex, &Vbo,
- &Lbo, &ByteCount)) {
- ocfs_remove_extent_map_entry (osb,
- &OCFS_I(inode)->ip_ext_map,
- Vbo, ByteCount);
- }
- }
-
- LOG_EXIT ();
- return;
-} /* ocfs_delete_all_extent_maps */
-
-
-/*
* ocfs_get_next_extent_map_entry()
*
* This routine looks up the existing mapping of VBO to LBO for a file.
Modified: trunk/src/extmap.h
===================================================================
--- trunk/src/extmap.h 2004-08-20 20:02:42 UTC (rev 1367)
+++ trunk/src/extmap.h 2004-08-20 21:36:01 UTC (rev 1368)
@@ -34,7 +34,6 @@
ocfs2_extent_rec *rec);
int ocfs_add_extent_map_entry(ocfs_super *osb, ocfs_extent_map *Map,
__s64 Vbo, __s64 Lbo, __u64 ByteCount);
-void ocfs_delete_all_extent_maps(ocfs_super *osb, struct inode *oin);
void ocfs_extent_map_destroy(ocfs_extent_map *map);
void ocfs_extent_map_init(ocfs_extent_map *map);
int ocfs_get_next_extent_map_entry(ocfs_super *osb,
Modified: trunk/src/file.c
===================================================================
--- trunk/src/file.c 2004-08-20 20:02:42 UTC (rev 1367)
+++ trunk/src/file.c 2004-08-20 21:36:01 UTC (rev 1368)
@@ -323,7 +323,6 @@
}
#endif
-
osb = OCFS_SB(inode->i_sb);
/* dir */
@@ -1461,7 +1460,8 @@
down (&(OCFS_I(inode)->ip_sem));
if (inode->i_size > newsize) {
- ocfs_delete_all_extent_maps(osb, inode);
+ ocfs_extent_map_destroy(&OCFS_I(inode)->ip_ext_map);
+ ocfs_extent_map_init (&OCFS_I(inode)->ip_ext_map);
}
inode->i_size = newsize;
inode->i_blocks = (newsize + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
More information about the Ocfs2-commits
mailing list