diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-03-03 13:24:33 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-03-24 17:58:28 -0500 |
commit | b0697053f9e8de9cea3d510d9e290851ece9460b (patch) | |
tree | bcfa2ae33e4a5302ddbe94dec0eaf95013e79850 /fs/ocfs2/dir.c | |
parent | 29004858a76ba9e26393dd8a85e653f105a33753 (diff) |
ocfs2: don't use MLF* in the file system
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dir.c')
-rw-r--r-- | fs/ocfs2/dir.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 57158fa75d91..ae47f450792f 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c | |||
@@ -83,7 +83,8 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) | |||
83 | struct super_block * sb = inode->i_sb; | 83 | struct super_block * sb = inode->i_sb; |
84 | int have_disk_lock = 0; | 84 | int have_disk_lock = 0; |
85 | 85 | ||
86 | mlog_entry("dirino=%"MLFu64"\n", OCFS2_I(inode)->ip_blkno); | 86 | mlog_entry("dirino=%llu\n", |
87 | (unsigned long long)OCFS2_I(inode)->ip_blkno); | ||
87 | 88 | ||
88 | stored = 0; | 89 | stored = 0; |
89 | bh = NULL; | 90 | bh = NULL; |
@@ -104,9 +105,9 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) | |||
104 | blk = (filp->f_pos) >> sb->s_blocksize_bits; | 105 | blk = (filp->f_pos) >> sb->s_blocksize_bits; |
105 | bh = ocfs2_bread(inode, blk, &err, 0); | 106 | bh = ocfs2_bread(inode, blk, &err, 0); |
106 | if (!bh) { | 107 | if (!bh) { |
107 | mlog(ML_ERROR, "directory #%"MLFu64" contains a hole " | 108 | mlog(ML_ERROR, |
108 | "at offset %lld\n", | 109 | "directory #%llu contains a hole at offset %lld\n", |
109 | OCFS2_I(inode)->ip_blkno, | 110 | (unsigned long long)OCFS2_I(inode)->ip_blkno, |
110 | filp->f_pos); | 111 | filp->f_pos); |
111 | filp->f_pos += sb->s_blocksize - offset; | 112 | filp->f_pos += sb->s_blocksize - offset; |
112 | continue; | 113 | continue; |
@@ -214,9 +215,9 @@ int ocfs2_find_files_on_disk(const char *name, | |||
214 | int status = -ENOENT; | 215 | int status = -ENOENT; |
215 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 216 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
216 | 217 | ||
217 | mlog_entry("(osb=%p, parent=%"MLFu64", name='%.*s', blkno=%p, " | 218 | mlog_entry("(osb=%p, parent=%llu, name='%.*s', blkno=%p, inode=%p)\n", |
218 | "inode=%p)\n", | 219 | osb, (unsigned long long)OCFS2_I(inode)->ip_blkno, |
219 | osb, OCFS2_I(inode)->ip_blkno, namelen, name, blkno, inode); | 220 | namelen, name, blkno, inode); |
220 | 221 | ||
221 | *dirent_bh = ocfs2_find_entry(name, namelen, inode, dirent); | 222 | *dirent_bh = ocfs2_find_entry(name, namelen, inode, dirent); |
222 | if (!*dirent_bh || !*dirent) { | 223 | if (!*dirent_bh || !*dirent) { |
@@ -255,8 +256,8 @@ int ocfs2_check_dir_for_entry(struct inode *dir, | |||
255 | struct buffer_head *dirent_bh = NULL; | 256 | struct buffer_head *dirent_bh = NULL; |
256 | struct ocfs2_dir_entry *dirent = NULL; | 257 | struct ocfs2_dir_entry *dirent = NULL; |
257 | 258 | ||
258 | mlog_entry("dir %"MLFu64", name '%.*s'\n", OCFS2_I(dir)->ip_blkno, | 259 | mlog_entry("dir %llu, name '%.*s'\n", |
259 | namelen, name); | 260 | (unsigned long long)OCFS2_I(dir)->ip_blkno, namelen, name); |
260 | 261 | ||
261 | ret = -EEXIST; | 262 | ret = -EEXIST; |
262 | dirent_bh = ocfs2_find_entry(name, namelen, dir, &dirent); | 263 | dirent_bh = ocfs2_find_entry(name, namelen, dir, &dirent); |
@@ -287,9 +288,8 @@ int ocfs2_empty_dir(struct inode *inode) | |||
287 | if ((i_size_read(inode) < | 288 | if ((i_size_read(inode) < |
288 | (OCFS2_DIR_REC_LEN(1) + OCFS2_DIR_REC_LEN(2))) || | 289 | (OCFS2_DIR_REC_LEN(1) + OCFS2_DIR_REC_LEN(2))) || |
289 | !(bh = ocfs2_bread(inode, 0, &err, 0))) { | 290 | !(bh = ocfs2_bread(inode, 0, &err, 0))) { |
290 | mlog(ML_ERROR, "bad directory (dir #%"MLFu64") - " | 291 | mlog(ML_ERROR, "bad directory (dir #%llu) - no data block\n", |
291 | "no data block\n", | 292 | (unsigned long long)OCFS2_I(inode)->ip_blkno); |
292 | OCFS2_I(inode)->ip_blkno); | ||
293 | return 1; | 293 | return 1; |
294 | } | 294 | } |
295 | 295 | ||
@@ -300,9 +300,8 @@ int ocfs2_empty_dir(struct inode *inode) | |||
300 | !le64_to_cpu(de1->inode) || | 300 | !le64_to_cpu(de1->inode) || |
301 | strcmp(".", de->name) || | 301 | strcmp(".", de->name) || |
302 | strcmp("..", de1->name)) { | 302 | strcmp("..", de1->name)) { |
303 | mlog(ML_ERROR, "bad directory (dir #%"MLFu64") - " | 303 | mlog(ML_ERROR, "bad directory (dir #%llu) - no `.' or `..'\n", |
304 | "no `.' or `..'\n", | 304 | (unsigned long long)OCFS2_I(inode)->ip_blkno); |
305 | OCFS2_I(inode)->ip_blkno); | ||
306 | brelse(bh); | 305 | brelse(bh); |
307 | return 1; | 306 | return 1; |
308 | } | 307 | } |
@@ -314,9 +313,8 @@ int ocfs2_empty_dir(struct inode *inode) | |||
314 | bh = ocfs2_bread(inode, | 313 | bh = ocfs2_bread(inode, |
315 | offset >> sb->s_blocksize_bits, &err, 0); | 314 | offset >> sb->s_blocksize_bits, &err, 0); |
316 | if (!bh) { | 315 | if (!bh) { |
317 | mlog(ML_ERROR, "directory #%"MLFu64" contains " | 316 | mlog(ML_ERROR, "dir %llu has a hole at %lu\n", |
318 | "a hole at offset %lu\n", | 317 | (unsigned long long)OCFS2_I(inode)->ip_blkno, offset); |
319 | OCFS2_I(inode)->ip_blkno, offset); | ||
320 | offset += sb->s_blocksize; | 318 | offset += sb->s_blocksize; |
321 | continue; | 319 | continue; |
322 | } | 320 | } |
@@ -406,8 +404,8 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb, | |||
406 | mlog_entry_void(); | 404 | mlog_entry_void(); |
407 | 405 | ||
408 | dir_i_size = i_size_read(dir); | 406 | dir_i_size = i_size_read(dir); |
409 | mlog(0, "extending dir %"MLFu64" (i_size = %lld)\n", | 407 | mlog(0, "extending dir %llu (i_size = %lld)\n", |
410 | OCFS2_I(dir)->ip_blkno, dir_i_size); | 408 | (unsigned long long)OCFS2_I(dir)->ip_blkno, dir_i_size); |
411 | 409 | ||
412 | handle = ocfs2_alloc_handle(osb); | 410 | handle = ocfs2_alloc_handle(osb); |
413 | if (handle == NULL) { | 411 | if (handle == NULL) { |
@@ -531,8 +529,8 @@ int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb, | |||
531 | 529 | ||
532 | mlog_entry_void(); | 530 | mlog_entry_void(); |
533 | 531 | ||
534 | mlog(0, "getting ready to insert namelen %d into dir %"MLFu64"\n", | 532 | mlog(0, "getting ready to insert namelen %d into dir %llu\n", |
535 | namelen, OCFS2_I(dir)->ip_blkno); | 533 | namelen, (unsigned long long)OCFS2_I(dir)->ip_blkno); |
536 | 534 | ||
537 | BUG_ON(!S_ISDIR(dir->i_mode)); | 535 | BUG_ON(!S_ISDIR(dir->i_mode)); |
538 | fe = (struct ocfs2_dinode *) parent_fe_bh->b_data; | 536 | fe = (struct ocfs2_dinode *) parent_fe_bh->b_data; |