X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Focfs2%2Fdir.c;fp=fs%2Focfs2%2Fdir.c;h=57158fa75d9183b172e8ccf49f421a567ed9dede;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=3d494d1a5f36360bd2f90983c05fff5b9b2f88a5;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 3d494d1a5..57158fa75 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c @@ -83,8 +83,7 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) struct super_block * sb = inode->i_sb; int have_disk_lock = 0; - mlog_entry("dirino=%llu\n", - (unsigned long long)OCFS2_I(inode)->ip_blkno); + mlog_entry("dirino=%"MLFu64"\n", OCFS2_I(inode)->ip_blkno); stored = 0; bh = NULL; @@ -105,9 +104,9 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) blk = (filp->f_pos) >> sb->s_blocksize_bits; bh = ocfs2_bread(inode, blk, &err, 0); if (!bh) { - mlog(ML_ERROR, - "directory #%llu contains a hole at offset %lld\n", - (unsigned long long)OCFS2_I(inode)->ip_blkno, + mlog(ML_ERROR, "directory #%"MLFu64" contains a hole " + "at offset %lld\n", + OCFS2_I(inode)->ip_blkno, filp->f_pos); filp->f_pos += sb->s_blocksize - offset; continue; @@ -213,9 +212,11 @@ int ocfs2_find_files_on_disk(const char *name, struct ocfs2_dir_entry **dirent) { int status = -ENOENT; + struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); - mlog_entry("(name=%.*s, blkno=%p, inode=%p, dirent_bh=%p, dirent=%p)\n", - namelen, name, blkno, inode, dirent_bh, dirent); + mlog_entry("(osb=%p, parent=%"MLFu64", name='%.*s', blkno=%p, " + "inode=%p)\n", + osb, OCFS2_I(inode)->ip_blkno, namelen, name, blkno, inode); *dirent_bh = ocfs2_find_entry(name, namelen, inode, dirent); if (!*dirent_bh || !*dirent) { @@ -254,8 +255,8 @@ int ocfs2_check_dir_for_entry(struct inode *dir, struct buffer_head *dirent_bh = NULL; struct ocfs2_dir_entry *dirent = NULL; - mlog_entry("dir %llu, name '%.*s'\n", - (unsigned long long)OCFS2_I(dir)->ip_blkno, namelen, name); + mlog_entry("dir %"MLFu64", name '%.*s'\n", OCFS2_I(dir)->ip_blkno, + namelen, name); ret = -EEXIST; dirent_bh = ocfs2_find_entry(name, namelen, dir, &dirent); @@ -286,8 +287,9 @@ int ocfs2_empty_dir(struct inode *inode) if ((i_size_read(inode) < (OCFS2_DIR_REC_LEN(1) + OCFS2_DIR_REC_LEN(2))) || !(bh = ocfs2_bread(inode, 0, &err, 0))) { - mlog(ML_ERROR, "bad directory (dir #%llu) - no data block\n", - (unsigned long long)OCFS2_I(inode)->ip_blkno); + mlog(ML_ERROR, "bad directory (dir #%"MLFu64") - " + "no data block\n", + OCFS2_I(inode)->ip_blkno); return 1; } @@ -298,8 +300,9 @@ int ocfs2_empty_dir(struct inode *inode) !le64_to_cpu(de1->inode) || strcmp(".", de->name) || strcmp("..", de1->name)) { - mlog(ML_ERROR, "bad directory (dir #%llu) - no `.' or `..'\n", - (unsigned long long)OCFS2_I(inode)->ip_blkno); + mlog(ML_ERROR, "bad directory (dir #%"MLFu64") - " + "no `.' or `..'\n", + OCFS2_I(inode)->ip_blkno); brelse(bh); return 1; } @@ -311,8 +314,9 @@ int ocfs2_empty_dir(struct inode *inode) bh = ocfs2_bread(inode, offset >> sb->s_blocksize_bits, &err, 0); if (!bh) { - mlog(ML_ERROR, "dir %llu has a hole at %lu\n", - (unsigned long long)OCFS2_I(inode)->ip_blkno, offset); + mlog(ML_ERROR, "directory #%"MLFu64" contains " + "a hole at offset %lu\n", + OCFS2_I(inode)->ip_blkno, offset); offset += sb->s_blocksize; continue; } @@ -402,8 +406,8 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb, mlog_entry_void(); dir_i_size = i_size_read(dir); - mlog(0, "extending dir %llu (i_size = %lld)\n", - (unsigned long long)OCFS2_I(dir)->ip_blkno, dir_i_size); + mlog(0, "extending dir %"MLFu64" (i_size = %lld)\n", + OCFS2_I(dir)->ip_blkno, dir_i_size); handle = ocfs2_alloc_handle(osb); if (handle == NULL) { @@ -527,8 +531,8 @@ int ocfs2_prepare_dir_for_insert(struct ocfs2_super *osb, mlog_entry_void(); - mlog(0, "getting ready to insert namelen %d into dir %llu\n", - namelen, (unsigned long long)OCFS2_I(dir)->ip_blkno); + mlog(0, "getting ready to insert namelen %d into dir %"MLFu64"\n", + namelen, OCFS2_I(dir)->ip_blkno); BUG_ON(!S_ISDIR(dir->i_mode)); fe = (struct ocfs2_dinode *) parent_fe_bh->b_data;