[Ocfs2-commits] mfasheh commits r2232 - trunk/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu May 12 18:53:42 CDT 2005
Author: mfasheh
Signed-off-by: zab
Date: 2005-05-12 18:53:41 -0500 (Thu, 12 May 2005)
New Revision: 2232
Modified:
trunk/fs/ocfs2/dir.c
trunk/fs/ocfs2/file.c
trunk/fs/ocfs2/localalloc.c
trunk/fs/ocfs2/namei.c
trunk/fs/ocfs2/suballoc.c
Log:
* filter -ENOSPC from some of our error prints
* Turn some error prints into logs and debug messages
* ocfs2_zero_extend wasn't printing useful information on error, have it do
so.
* newline terminate the error message in ocfs2_file_finish_extension
Signed-off-by: zab
Modified: trunk/fs/ocfs2/dir.c
===================================================================
--- trunk/fs/ocfs2/dir.c 2005-05-12 23:03:30 UTC (rev 2231)
+++ trunk/fs/ocfs2/dir.c 2005-05-12 23:53:41 UTC (rev 2232)
@@ -415,14 +415,16 @@
status = ocfs_reserve_new_metadata(osb, handle,
fe, &meta_ac);
if (status < 0) {
- mlog_errno(status);
+ if (status != -ENOSPC)
+ mlog_errno(status);
goto bail;
}
}
status = ocfs_reserve_clusters(osb, handle, 1, &data_ac);
if (status < 0) {
- mlog_errno(status);
+ if (status != -ENOSPC)
+ mlog_errno(status);
goto bail;
}
Modified: trunk/fs/ocfs2/file.c
===================================================================
--- trunk/fs/ocfs2/file.c 2005-05-12 23:03:30 UTC (rev 2231)
+++ trunk/fs/ocfs2/file.c 2005-05-12 23:53:41 UTC (rev 2232)
@@ -188,7 +188,7 @@
*/
if (status)
mlog(ML_ERROR, "Unable to pre-zero extension of inode "
- "(%d)", status);
+ "(%d)\n", status);
}
}
@@ -563,10 +563,16 @@
offset = (unsigned int)(size & (PAGE_CACHE_SIZE - 1)) + 1;
res = mapping->a_ops->prepare_write(NULL, page, offset,
offset);
- if (!res)
- res = mapping->a_ops->commit_write(NULL, page,
- offset,
- offset);
+ if (res < 0) {
+ mlog_errno(res);
+ goto bail_unlock;
+ }
+
+ res = mapping->a_ops->commit_write(NULL, page, offset, offset);
+ if (res < 0)
+ mlog_errno(res);
+
+bail_unlock:
unlock_page(page);
page_cache_release(page);
mark_inode_dirty(inode);
@@ -765,7 +771,8 @@
fe,
&meta_ac);
if (status < 0) {
- mlog_errno (status);
+ if (status != -ENOSPC)
+ mlog_errno(status);
goto leave;
}
}
Modified: trunk/fs/ocfs2/localalloc.c
===================================================================
--- trunk/fs/ocfs2/localalloc.c 2005-05-12 23:03:30 UTC (rev 2231)
+++ trunk/fs/ocfs2/localalloc.c 2005-05-12 23:53:41 UTC (rev 2232)
@@ -832,7 +832,8 @@
status = ocfs_reserve_cluster_bitmap_bits(osb, *ac);
if (status < 0) {
- mlog_errno(status);
+ if (status != -ENOSPC)
+ mlog_errno(status);
goto bail;
}
@@ -937,7 +938,8 @@
&main_bm_inode,
&main_bm_bh);
if (status < 0) {
- mlog_errno(status);
+ if (status != -ENOSPC)
+ mlog_errno(status);
goto bail;
}
Modified: trunk/fs/ocfs2/namei.c
===================================================================
--- trunk/fs/ocfs2/namei.c 2005-05-12 23:03:30 UTC (rev 2231)
+++ trunk/fs/ocfs2/namei.c 2005-05-12 23:53:41 UTC (rev 2232)
@@ -387,7 +387,8 @@
if (S_ISDIR(mode)) {
status = ocfs_reserve_clusters(osb, handle, 1, &data_ac);
if (status < 0) {
- mlog_errno(status);
+ if (status != -ENOSPC)
+ mlog_errno(status);
goto leave;
}
}
@@ -1546,7 +1547,8 @@
status = ocfs_reserve_new_inode(osb, handle, &inode_ac);
if (status < 0) {
- mlog_errno(status);
+ if (status != -ENOSPC)
+ mlog_errno(status);
goto bail;
}
@@ -1554,7 +1556,8 @@
if (l > ocfs2_fast_symlink_chars(sb)) {
status = ocfs_reserve_clusters(osb, handle, 1, &data_ac);
if (status < 0) {
- mlog_errno(status);
+ if (status != -ENOSPC)
+ mlog_errno(status);
goto bail;
}
}
Modified: trunk/fs/ocfs2/suballoc.c
===================================================================
--- trunk/fs/ocfs2/suballoc.c 2005-05-12 23:03:30 UTC (rev 2231)
+++ trunk/fs/ocfs2/suballoc.c 2005-05-12 23:53:41 UTC (rev 2232)
@@ -373,8 +373,8 @@
if (bits_wanted > free_bits) {
/* cluster bitmap never grows */
if (ocfs2_is_cluster_bitmap(alloc_inode)) {
- mlog(ML_ERROR, "Disk Full: wanted=%u, free_bits=%u\n",
- bits_wanted, free_bits);
+ mlog(0, "Disk Full: wanted=%u, free_bits=%u\n",
+ bits_wanted, free_bits);
status = -ENOSPC;
goto bail;
}
@@ -436,7 +436,8 @@
status = ocfs_reserve_suballoc_bits(osb, (*ac));
if (status < 0) {
- mlog_errno(status);
+ if (status != -ENOSPC)
+ mlog_errno(status);
goto bail;
}
@@ -566,7 +567,7 @@
/* reserve_local_bits will return enospc with
* the local alloc inode still locked, so we
* can change this safely here. */
- mlog(ML_ERROR, "Disabling local alloc\n");
+ mlog(ML_NOTICE, "Disabling local alloc\n");
osb->have_local_alloc = 0;
// ocfs_shutdown_local_alloc(osb);
}
@@ -686,7 +687,8 @@
*bits_found = best_size;
} else {
status = -ENOSPC;
- mlog_errno(status);
+ /* No error log here -- see the comment above
+ * ocfs_test_bg_bit_allocatable */
}
return status;
More information about the Ocfs2-commits
mailing list