aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/aops.c6
-rw-r--r--fs/ocfs2/dlmglue.c54
-rw-r--r--fs/ocfs2/dlmglue.h7
-rw-r--r--fs/ocfs2/file.c8
-rw-r--r--fs/ocfs2/file.h5
5 files changed, 36 insertions, 44 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 56963e6c46c0..d76de384e029 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -939,9 +939,9 @@ out:
939 * Returns a negative error code or the number of bytes copied into 939 * Returns a negative error code or the number of bytes copied into
940 * the page. 940 * the page.
941 */ 941 */
942int ocfs2_write_data_page(struct inode *inode, handle_t *handle, 942static int ocfs2_write_data_page(struct inode *inode, handle_t *handle,
943 u64 *p_blkno, struct page *page, 943 u64 *p_blkno, struct page *page,
944 struct ocfs2_write_ctxt *wc, int new) 944 struct ocfs2_write_ctxt *wc, int new)
945{ 945{
946 int ret, copied = 0; 946 int ret, copied = 0;
947 unsigned int from = 0, to = 0; 947 unsigned int from = 0, to = 0;
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 27e43b0c0eae..024777abc8e3 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -104,6 +104,35 @@ static int ocfs2_dentry_convert_worker(struct ocfs2_lock_res *lockres,
104static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb, 104static void ocfs2_dentry_post_unlock(struct ocfs2_super *osb,
105 struct ocfs2_lock_res *lockres); 105 struct ocfs2_lock_res *lockres);
106 106
107
108#define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __PRETTY_FUNCTION__, __LINE__, __lockres)
109
110/* This aids in debugging situations where a bad LVB might be involved. */
111static void ocfs2_dump_meta_lvb_info(u64 level,
112 const char *function,
113 unsigned int line,
114 struct ocfs2_lock_res *lockres)
115{
116 struct ocfs2_meta_lvb *lvb = (struct ocfs2_meta_lvb *) lockres->l_lksb.lvb;
117
118 mlog(level, "LVB information for %s (called from %s:%u):\n",
119 lockres->l_name, function, line);
120 mlog(level, "version: %u, clusters: %u, generation: 0x%x\n",
121 lvb->lvb_version, be32_to_cpu(lvb->lvb_iclusters),
122 be32_to_cpu(lvb->lvb_igeneration));
123 mlog(level, "size: %llu, uid %u, gid %u, mode 0x%x\n",
124 (unsigned long long)be64_to_cpu(lvb->lvb_isize),
125 be32_to_cpu(lvb->lvb_iuid), be32_to_cpu(lvb->lvb_igid),
126 be16_to_cpu(lvb->lvb_imode));
127 mlog(level, "nlink %u, atime_packed 0x%llx, ctime_packed 0x%llx, "
128 "mtime_packed 0x%llx iattr 0x%x\n", be16_to_cpu(lvb->lvb_inlink),
129 (long long)be64_to_cpu(lvb->lvb_iatime_packed),
130 (long long)be64_to_cpu(lvb->lvb_ictime_packed),
131 (long long)be64_to_cpu(lvb->lvb_imtime_packed),
132 be32_to_cpu(lvb->lvb_iattr));
133}
134
135
107/* 136/*
108 * OCFS2 Lock Resource Operations 137 * OCFS2 Lock Resource Operations
109 * 138 *
@@ -3078,28 +3107,3 @@ static void ocfs2_schedule_blocked_lock(struct ocfs2_super *osb,
3078 3107
3079 mlog_exit_void(); 3108 mlog_exit_void();
3080} 3109}
3081
3082/* This aids in debugging situations where a bad LVB might be involved. */
3083void ocfs2_dump_meta_lvb_info(u64 level,
3084 const char *function,
3085 unsigned int line,
3086 struct ocfs2_lock_res *lockres)
3087{
3088 struct ocfs2_meta_lvb *lvb = (struct ocfs2_meta_lvb *) lockres->l_lksb.lvb;
3089
3090 mlog(level, "LVB information for %s (called from %s:%u):\n",
3091 lockres->l_name, function, line);
3092 mlog(level, "version: %u, clusters: %u, generation: 0x%x\n",
3093 lvb->lvb_version, be32_to_cpu(lvb->lvb_iclusters),
3094 be32_to_cpu(lvb->lvb_igeneration));
3095 mlog(level, "size: %llu, uid %u, gid %u, mode 0x%x\n",
3096 (unsigned long long)be64_to_cpu(lvb->lvb_isize),
3097 be32_to_cpu(lvb->lvb_iuid), be32_to_cpu(lvb->lvb_igid),
3098 be16_to_cpu(lvb->lvb_imode));
3099 mlog(level, "nlink %u, atime_packed 0x%llx, ctime_packed 0x%llx, "
3100 "mtime_packed 0x%llx iattr 0x%x\n", be16_to_cpu(lvb->lvb_inlink),
3101 (long long)be64_to_cpu(lvb->lvb_iatime_packed),
3102 (long long)be64_to_cpu(lvb->lvb_ictime_packed),
3103 (long long)be64_to_cpu(lvb->lvb_imtime_packed),
3104 be32_to_cpu(lvb->lvb_iattr));
3105}
diff --git a/fs/ocfs2/dlmglue.h b/fs/ocfs2/dlmglue.h
index 59cb566e7983..492bad32a8c0 100644
--- a/fs/ocfs2/dlmglue.h
+++ b/fs/ocfs2/dlmglue.h
@@ -119,11 +119,4 @@ void ocfs2_process_blocked_lock(struct ocfs2_super *osb,
119struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void); 119struct ocfs2_dlm_debug *ocfs2_new_dlm_debug(void);
120void ocfs2_put_dlm_debug(struct ocfs2_dlm_debug *dlm_debug); 120void ocfs2_put_dlm_debug(struct ocfs2_dlm_debug *dlm_debug);
121 121
122/* aids in debugging and tracking lvbs */
123void ocfs2_dump_meta_lvb_info(u64 level,
124 const char *function,
125 unsigned int line,
126 struct ocfs2_lock_res *lockres);
127#define mlog_meta_lvb(__level, __lockres) ocfs2_dump_meta_lvb_info(__level, __PRETTY_FUNCTION__, __LINE__, __lockres)
128
129#endif /* DLMGLUE_H */ 122#endif /* DLMGLUE_H */
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 3b5a1576ae10..7c7b5683f778 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -207,10 +207,10 @@ out:
207 return ret; 207 return ret;
208} 208}
209 209
210int ocfs2_set_inode_size(handle_t *handle, 210static int ocfs2_set_inode_size(handle_t *handle,
211 struct inode *inode, 211 struct inode *inode,
212 struct buffer_head *fe_bh, 212 struct buffer_head *fe_bh,
213 u64 new_i_size) 213 u64 new_i_size)
214{ 214{
215 int status; 215 int status;
216 216
diff --git a/fs/ocfs2/file.h b/fs/ocfs2/file.h
index 2c4460fced52..a4dd1fa1822b 100644
--- a/fs/ocfs2/file.h
+++ b/fs/ocfs2/file.h
@@ -56,11 +56,6 @@ int ocfs2_getattr(struct vfsmount *mnt, struct dentry *dentry,
56int ocfs2_permission(struct inode *inode, int mask, 56int ocfs2_permission(struct inode *inode, int mask,
57 struct nameidata *nd); 57 struct nameidata *nd);
58 58
59int ocfs2_set_inode_size(handle_t *handle,
60 struct inode *inode,
61 struct buffer_head *fe_bh,
62 u64 new_i_size);
63
64int ocfs2_should_update_atime(struct inode *inode, 59int ocfs2_should_update_atime(struct inode *inode,
65 struct vfsmount *vfsmnt); 60 struct vfsmount *vfsmnt);
66int ocfs2_update_inode_atime(struct inode *inode, 61int ocfs2_update_inode_atime(struct inode *inode,