[Ocfs2-commits] zab commits r1910 - in trunk/fs/ocfs2: . cluster dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Feb 23 19:02:29 CST 2005
Author: zab
Signed-off-by: manish
Date: 2005-02-23 19:02:28 -0600 (Wed, 23 Feb 2005)
New Revision: 1910
Modified:
trunk/fs/ocfs2/cluster/compat_libfs.c
trunk/fs/ocfs2/cluster/nodemanager.c
trunk/fs/ocfs2/dcache.c
trunk/fs/ocfs2/dir.c
trunk/fs/ocfs2/dlm/dlmast.c
trunk/fs/ocfs2/dlm/dlmconvert.c
trunk/fs/ocfs2/dlm/dlmlock.c
trunk/fs/ocfs2/dlm/dlmmaster.c
trunk/fs/ocfs2/dlm/dlmmod.c
trunk/fs/ocfs2/dlm/dlmrecovery.c
trunk/fs/ocfs2/dlm/dlmthread.c
trunk/fs/ocfs2/file.c
trunk/fs/ocfs2/journal.c
trunk/fs/ocfs2/namei.c
Log:
- use %.*s to limit output, not just pad it
Signed-off-by: manish
Modified: trunk/fs/ocfs2/cluster/compat_libfs.c
===================================================================
--- trunk/fs/ocfs2/cluster/compat_libfs.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/cluster/compat_libfs.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -476,7 +476,7 @@
continue;
name.name = files->name;
name.len = strlen(name.name);
- printk("adding file %*s\n", name.len, name.name);
+ printk("adding file %.*s\n", name.len, name.name);
name.hash = full_name_hash(name.name, name.len);
dentry = d_alloc(root, &name);
if (!dentry)
Modified: trunk/fs/ocfs2/cluster/nodemanager.c
===================================================================
--- trunk/fs/ocfs2/cluster/nodemanager.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/cluster/nodemanager.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -258,7 +258,7 @@
goto out;
name.name = file->name;
name.len = strlen(name.name);
- nmprintk("adding file %*s\n", name.len, name.name);
+ nmprintk("adding file %.*s\n", name.len, name.name);
name.hash = full_name_hash(name.name, name.len);
dentry = d_alloc(parent, &name);
if (!dentry) {
@@ -302,7 +302,7 @@
goto out;
name.name = file->name;
name.len = strlen(name.name);
- nmprintk("adding link %*s\n", name.len, name.name);
+ nmprintk("adding link %.*s\n", name.len, name.name);
name.hash = full_name_hash(name.name, name.len);
dentry = d_alloc(parent, &name);
if (!dentry) {
@@ -618,7 +618,7 @@
goto leave;
}
- ret = sprintf(buf, "0: node %u added to group: %*s",
+ ret = sprintf(buf, "0: node %u added to group: %.*s",
ino, dentry->d_name.len, dentry->d_name.name);
if (!igrab(child->d_inode))
@@ -805,7 +805,7 @@
d_alias);
priv = inode->u.generic_ip;
ret = sprintf(buf, "0: global_index=%u\n"
- "name=%*s\n",
+ "name=%.*s\n",
priv->node.node_num, dentry->d_name.len,
dentry->d_name.name);
buf += ret;
@@ -846,7 +846,7 @@
dentry = list_entry(inode->i_dentry.next, struct dentry,
d_alias);
ret = sprintf(buf, "0: group_num=%u\n"
- "name=%*s\n"
+ "name=%.*s\n"
"disk_uuid=%s\n",
group_num, dentry->d_name.len,
dentry->d_name.name, g->disk.uuid);
@@ -854,7 +854,7 @@
spin_lock(&dcache_lock);
list_for_each_entry(child, &dentry->d_subdirs, d_child) {
- tmpret = sprintf(buf, "%*s\n", child->d_name.len,
+ tmpret = sprintf(buf, "%.*s\n", child->d_name.len,
child->d_name.name);
buf += tmpret;
ret += tmpret;
Modified: trunk/fs/ocfs2/dcache.c
===================================================================
--- trunk/fs/ocfs2/dcache.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/dcache.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -50,7 +50,7 @@
LOG_SET_CONTEXT(D_REVALIDATE);
- LOG_ENTRY_ARGS ("(0x%p, %d, '%*s')\n", dentry, flags,
+ LOG_ENTRY_ARGS ("(0x%p, %d, '%.*s')\n", dentry, flags,
dentry->d_name.len, dentry->d_name.name);
if (inode == NULL)
Modified: trunk/fs/ocfs2/dir.c
===================================================================
--- trunk/fs/ocfs2/dir.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/dir.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -222,7 +222,7 @@
int status = -ENOENT;
int lock_acq = 0;
- LOG_ENTRY_ARGS ("(osb=%p, parent=%llu, name='%*s', blkno=%p, inode=%p)\n",
+ LOG_ENTRY_ARGS ("(osb=%p, parent=%llu, name='%.*s', blkno=%p, inode=%p)\n",
osb, OCFS_I(inode)->ip_blkno, namelen, name, blkno, inode);
if (take_lock) {
Modified: trunk/fs/ocfs2/dlm/dlmast.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmast.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/dlm/dlmast.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -114,7 +114,7 @@
}
if (!fn) {
- dlmprintk("eek! lock has no bast %*s! cookie=%llu\n",
+ dlmprintk("eek! lock has no bast %.*s! cookie=%llu\n",
res->lockname.len, res->lockname.name, lock->cookie);
ret = -EINVAL;
goto leave;
@@ -169,7 +169,7 @@
if (past->type != DLM_AST &&
past->type != DLM_BAST) {
dlmprintk("Eeeek unknown ast type! %d, cookie=%llu, "
- "name=%*s\n",
+ "name=%.*s\n",
past->type, cookie, locklen, name);
ret = DLM_IVLOCKID;
goto leave;
@@ -178,14 +178,14 @@
res = dlm_lookup_lock(dlm, name, locklen);
if (!res) {
dlmprintk("eek! got %sast for unknown lockres! cookie=%llu, "
- "name=%*s, namelen=%u\n",
+ "name=%.*s, namelen=%u\n",
past->type == DLM_AST ? "" : "b",
cookie, locklen, name, locklen);
ret = DLM_IVLOCKID;
goto leave;
}
- dlmprintk("lockres %*s\n", res->lockname.len, res->lockname.name);
+ dlmprintk("lockres %.*s\n", res->lockname.len, res->lockname.name);
if (!dlm_is_recovery_lock(past->name, past->namelen))
down_read(&dlm->recovery_sem);
spin_lock(&res->spinlock);
@@ -212,7 +212,7 @@
}
dlmprintk("eek! got %sast for unknown lock! cookie=%llu, "
- "name=%*s, namelen=%u\n",
+ "name=%.*s, namelen=%u\n",
past->type == DLM_AST ? "" : "b",
cookie, locklen, name, locklen);
spin_unlock(&res->spinlock);
@@ -278,7 +278,7 @@
struct iovec iov[2];
size_t iovlen = 1;
- dlmprintk("res %*s, to=%u, type=%d, blocked_type=%d\n",
+ dlmprintk("res %.*s, to=%u, type=%d, blocked_type=%d\n",
res->lockname.len, res->lockname.name, lock->node,
type, blocked_type);
Modified: trunk/fs/ocfs2/dlm/dlmconvert.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmconvert.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/dlm/dlmconvert.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -187,7 +187,7 @@
/* fall thru to grant */
grant:
- dlmprintk("res %*s, granting %s lock\n", res->lockname.len,
+ dlmprintk("res %.*s, granting %s lock\n", res->lockname.len,
res->lockname.name, dlm_lock_mode_name(type));
/* immediately grant the new lock type */
lock->lksb->status = DLM_NORMAL;
@@ -200,13 +200,13 @@
switch_queues:
if (flags & LKM_NOQUEUE) {
- dlmprintk("failed to convert NOQUEUE lock %*s from "
+ dlmprintk("failed to convert NOQUEUE lock %.*s from "
"%d to %d...\n", res->lockname.len,
res->lockname.name, lock->type, type);
status = DLM_NOTQUEUED;
goto unlock_exit;
}
- dlmprintk("res %*s, queueing...\n", res->lockname.len,
+ dlmprintk("res %.*s, queueing...\n", res->lockname.len,
res->lockname.name);
lock->convert_type = type;
Modified: trunk/fs/ocfs2/dlm/dlmlock.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmlock.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/dlm/dlmlock.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -148,7 +148,7 @@
dlm_status status = DLM_DENIED;
dlmprintk("type=%d\n", lock->type);
- dlmprintk("lockres %*s, flags = 0x%x\n", res->lockname.len,
+ dlmprintk("lockres %.*s, flags = 0x%x\n", res->lockname.len,
res->lockname.name, flags);
spin_lock(&res->spinlock);
Modified: trunk/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmaster.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/dlm/dlmmaster.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -188,7 +188,7 @@
* associated with them at init time. */
BUG_ON(!res->lockname.name);
- dlmprintk("destroying lockres %*s\n", res->lockname.len,
+ dlmprintk("destroying lockres %.*s\n", res->lockname.len,
res->lockname.name);
/* By the time we're ready to blow this guy away, we shouldn't
Modified: trunk/fs/ocfs2/dlm/dlmmod.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmod.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/dlm/dlmmod.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -932,7 +932,7 @@
bucket = &(dlm->resources[i]);
list_for_each(iter, bucket) {
res = list_entry(iter, dlm_lock_resource, list);
- dlmprintk("lockres: %*s, owner=%u, state=%u\n",
+ dlmprintk("lockres: %.*s, owner=%u, state=%u\n",
res->lockname.len, res->lockname.name,
res->owner, res->state);
spin_lock(&res->spinlock);
Modified: trunk/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmrecovery.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/dlm/dlmrecovery.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -500,14 +500,14 @@
if (past->type != DLM_AST &&
past->type != DLM_BAST) {
- dlmprintk("Eeeek unknown ast type! %d, cookie=%llu, name=%*s\n",
+ dlmprintk("Eeeek unknown ast type! %d, cookie=%llu, name=%.*s\n",
past->type, cookie, lockname.len, lockname.name);
return 0;
}
res = dlm_lookup_lock(dlm, &lockname);
if (!res) {
- dlmprintk("eek! got %sast for unknown lockres! cookie=%llu, name=%*s, namelen=%d\n",
+ dlmprintk("eek! got %sast for unknown lockres! cookie=%llu, name=%.*s, namelen=%d\n",
past->type == DLM_AST ? "" : "b", cookie, lockname.len, lockname.name, lockname.len);
return 0;
}
@@ -543,14 +543,14 @@
if (past->type != DLM_AST &&
past->type != DLM_BAST) {
- dlmprintk("Eeeek unknown ast type! %d, cookie=%llu, name=%*s\n",
+ dlmprintk("Eeeek unknown ast type! %d, cookie=%llu, name=%.*s\n",
past->type, cookie, lockname.len, lockname.name);
return 0;
}
res = dlm_lookup_lock(dlm, &lockname);
if (!res) {
- dlmprintk("eek! got %sast for unknown lockres! cookie=%llu, name=%*s, namelen=%d\n",
+ dlmprintk("eek! got %sast for unknown lockres! cookie=%llu, name=%.*s, namelen=%d\n",
past->type == DLM_AST ? "" : "b", cookie, lockname.len, lockname.name, lockname.len);
return 0;
}
Modified: trunk/fs/ocfs2/dlm/dlmthread.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmthread.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/dlm/dlmthread.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -71,7 +71,7 @@
struct list_head *head;
s8 hi;
- dlmprintk("shuffle res %*s\n", res->lockname.len, res->lockname.name);
+ dlmprintk("shuffle res %.*s\n", res->lockname.len, res->lockname.name);
spin_lock(&res->spinlock);
@@ -95,7 +95,7 @@
converting:
if (list_empty(&res->converting))
goto blocked;
- dlmprintk("res %*s has locks on a convert queue\n", res->lockname.len,
+ dlmprintk("res %.*s has locks on a convert queue\n", res->lockname.len,
res->lockname.name);
target = list_entry(res->converting.next, dlm_lock, list);
@@ -134,7 +134,7 @@
spin_lock(&target->spinlock);
DLM_ASSERT(target->highest_blocked == LKM_IVMODE);
- dlmprintk("calling ast for converting lock: %*s, have: %d, "
+ dlmprintk("calling ast for converting lock: %.*s, have: %d, "
"granting: %d, node: %u\n", res->lockname.len,
res->lockname.name, target->type,
target->convert_type, target->node);
@@ -193,7 +193,7 @@
spin_lock(&target->spinlock);
DLM_ASSERT(target->highest_blocked == LKM_IVMODE);
- dlmprintk("calling ast for blocked lock: %*s, granting: %d, "
+ dlmprintk("calling ast for blocked lock: %.*s, granting: %d, "
"node: %u\n", res->lockname.len, res->lockname.name,
target->type, target->node);
Modified: trunk/fs/ocfs2/file.c
===================================================================
--- trunk/fs/ocfs2/file.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/file.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -97,7 +97,7 @@
int mode = file->f_flags;
ocfs_inode_private *oip = OCFS_I(inode);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", inode, file,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%.*s')\n", inode, file,
file->f_dentry->d_name.len,
file->f_dentry->d_name.name);
@@ -129,7 +129,7 @@
ocfs_inode_private *oip = OCFS_I(inode);
LOG_SET_CONTEXT(RELEASE);
- LOG_ENTRY_ARGS("(0x%p, 0x%p, '%*s')\n", inode, file,
+ LOG_ENTRY_ARGS("(0x%p, 0x%p, '%.*s')\n", inode, file,
file->f_dentry->d_name.len,
file->f_dentry->d_name.name);
@@ -157,7 +157,7 @@
LOG_SET_CONTEXT(FSYNC);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", file, dentry, datasync,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%.*s')\n", file, dentry, datasync,
dentry->d_name.len, dentry->d_name.name);
err = ocfs_sync_inode(dentry->d_inode);
@@ -199,7 +199,7 @@
LOG_SET_CONTEXT(WRITE);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, '%*s')\n", filp, buf,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, '%.*s')\n", filp, buf,
(unsigned int)count,
filp->f_dentry->d_name.len,
filp->f_dentry->d_name.name);
@@ -431,7 +431,7 @@
LOG_SET_CONTEXT(READ);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, '%*s')\n", filp, buf,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u, '%.*s')\n", filp, buf,
(unsigned int)count, filp->f_dentry->d_name.len,
filp->f_dentry->d_name.name);
if (!inode) {
@@ -1119,7 +1119,7 @@
struct buffer_head *bh = NULL;
ocfs_journal_handle *handle = NULL;
- LOG_ENTRY_ARGS ("(0x%p, '%*s')\n", dentry,
+ LOG_ENTRY_ARGS ("(0x%p, '%.*s')\n", dentry,
dentry->d_name.len, dentry->d_name.name);
if (attr->ia_valid & ATTR_MODE)
Modified: trunk/fs/ocfs2/journal.c
===================================================================
--- trunk/fs/ocfs2/journal.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/journal.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -1385,7 +1385,7 @@
LOG_ERROR_ARGS("block %llu contains invalid "
"de: inode = %llu, rec_len = "
"%u, name_len = %u, file_type "
- "= %u, name='%*s'\n",
+ "= %u, name='%.*s'\n",
(unsigned long long) bh->b_blocknr,
le64_to_cpu(de->inode),
le16_to_cpu(de->rec_len),
Modified: trunk/fs/ocfs2/namei.c
===================================================================
--- trunk/fs/ocfs2/namei.c 2005-02-23 18:26:38 UTC (rev 1909)
+++ trunk/fs/ocfs2/namei.c 2005-02-24 01:02:28 UTC (rev 1910)
@@ -150,7 +150,7 @@
LOG_SET_CONTEXT(LOOKUP);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", dir, dentry,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%.*s')\n", dir, dentry,
dentry->d_name.len, dentry->d_name.name);
if (dentry->d_name.len > OCFS2_MAX_FILENAME_LENGTH) {
@@ -276,7 +276,7 @@
LOG_SET_CONTEXT(MKNOD);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, %lu, '%*s')\n", dir, dentry, mode,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, mode,
(unsigned long)dev, dentry->d_name.len, dentry->d_name.name);
/* get our super block */
@@ -466,7 +466,7 @@
u64 fe_blkno = 0;
u16 suballoc_bit;
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, %lu, '%*s')\n", dir, dentry, mode,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, %lu, '%.*s')\n", dir, dentry, mode,
(unsigned long)dev, dentry->d_name.len, dentry->d_name.name);
OCFS_ASSERT(new_fe_bh);
@@ -569,7 +569,7 @@
LOG_SET_CONTEXT(MKDIR);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", dir, dentry, mode,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode,
dentry->d_name.len, dentry->d_name.name);
ret = ocfs_mknod (dir, dentry, mode | S_IFDIR, 0);
LOG_EXIT_INT (ret);
@@ -588,7 +588,7 @@
LOG_SET_CONTEXT(CREATE);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", dir, dentry, mode,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%.*s')\n", dir, dentry, mode,
dentry->d_name.len, dentry->d_name.name);
ret = ocfs_mknod (dir, dentry, mode | S_IFREG, 0);
LOG_EXIT_INT (ret);
@@ -615,7 +615,7 @@
LOG_SET_CONTEXT(LINK);
- LOG_ENTRY_ARGS ("(inode=%lu, old='%*s' new='%*s')\n",
+ LOG_ENTRY_ARGS ("(inode=%lu, old='%.*s' new='%.*s')\n",
inode->i_ino, old_dentry->d_name.len,
old_dentry->d_name.name, dentry->d_name.len,
dentry->d_name.name);
@@ -739,7 +739,7 @@
LOG_SET_CONTEXT(UNLINK);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", dir, dentry,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%.*s')\n", dir, dentry,
dentry->d_name.len, dentry->d_name.name);
OCFS_ASSERT((dentry->d_parent->d_inode == dir));
@@ -999,7 +999,7 @@
LOG_SET_CONTEXT(RENAME);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, 0x%p, 0x%p, from='%*s' to='%*s')\n",
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, 0x%p, 0x%p, from='%.*s' to='%.*s')\n",
old_dir, old_dentry, new_dir, new_dentry,
old_dentry->d_name.len, old_dentry->d_name.name,
new_dentry->d_name.len, new_dentry->d_name.name);
@@ -1469,7 +1469,7 @@
LOG_SET_CONTEXT(SYMLINK);
- LOG_ENTRY_ARGS ("(0x%p, 0x%p, symname='%s' actual='%*s')\n", dir,
+ LOG_ENTRY_ARGS ("(0x%p, 0x%p, symname='%s' actual='%.*s')\n", dir,
dentry, symname, dentry->d_name.len,
dentry->d_name.name);
More information about the Ocfs2-commits
mailing list