cleanup: every printk should prefix with "unionfs: " consistently
authorErez_Zadok <ezk@cs.sunysb.edu>
Sat, 24 Mar 2007 22:36:59 +0000 (18:36 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 12 Jan 2009 23:20:22 +0000 (18:20 -0500)
fs/unionfs/commonfops.c
fs/unionfs/copyup.c
fs/unionfs/dentry.c
fs/unionfs/inode.c
fs/unionfs/lookup.c
fs/unionfs/main.c
fs/unionfs/rdstate.c
fs/unionfs/rename.c
fs/unionfs/sioq.c
fs/unionfs/subr.c
fs/unionfs/super.c

index 9dc4c8d83ad8d299907dee91cd311579fdc57ae5..29322aa76cc7f8c54413984cfdf90f6382f47330 100644 (file)
@@ -350,8 +350,8 @@ int unionfs_file_revalidate(struct file *file, int willwrite)
        if (willwrite && IS_WRITE_FLAG(file->f_flags) &&
            !IS_WRITE_FLAG(unionfs_lower_file(file)->f_flags) &&
            is_robranch(dentry)) {
-               printk(KERN_DEBUG "Doing delayed copyup of a read-write "
-                      "file on a read-only branch.\n");
+               printk(KERN_DEBUG "unionfs: Doing delayed copyup of a "
+                      "read-write file on a read-only branch.\n");
                err = do_delayed_copyup(file, dentry);
        }
 
@@ -566,7 +566,8 @@ int unionfs_file_release(struct inode *inode, struct file *file)
 
        if (fileinfo->rdstate) {
                fileinfo->rdstate->access = jiffies;
-               printk(KERN_DEBUG "Saving rdstate with cookie %u [%d.%lld]\n",
+               printk(KERN_DEBUG "unionfs: saving rdstate with cookie "
+                      "%u [%d.%lld]\n",
                       fileinfo->rdstate->cookie,
                       fileinfo->rdstate->bindex,
                       (long long)fileinfo->rdstate->dirpos);
index ca3b0ddf11aadaee7a6e7a4a4a1fbd09cc9222e5..f4e354ff38135e241a997c08d32ee37a424aea38 100644 (file)
@@ -183,7 +183,7 @@ static int __copyup_ndentry(struct dentry *old_hidden_dentry,
                run_sioq(__unionfs_create, &args);
                err = args.err;
        } else {
-               printk(KERN_ERR "Unknown inode type %d\n",
+               printk(KERN_ERR "unionfs: unknown inode type %d\n",
                       old_mode);
                BUG();
        }
index ab3f9e64031852d9b4bcdffe0755147707098627..07c67da9e086d24a0613fc5970dd7282935c3572 100644 (file)
@@ -48,7 +48,8 @@ static int __unionfs_d_revalidate_one(struct dentry *dentry,
 
        /* if the dentry is unhashed, do NOT revalidate */
        if (d_deleted(dentry)) {
-               printk(KERN_DEBUG "unhashed dentry being revalidated: %*s\n",
+               printk(KERN_DEBUG "unionfs: unhashed dentry being "
+                      "revalidated: %*s\n",
                       dentry->d_name.len, dentry->d_name.name);
                goto out;
        }
@@ -291,12 +292,13 @@ static void unionfs_d_release(struct dentry *dentry)
 
        /* this could be a negative dentry, so check first */
        if (!UNIONFS_D(dentry)) {
-               printk(KERN_DEBUG "dentry without private data: %.*s",
+               printk(KERN_DEBUG "unionfs: dentry without private data: %.*s",
                       dentry->d_name.len, dentry->d_name.name);
                goto out;
        } else if (dbstart(dentry) < 0) {
                /* this is due to a failed lookup */
-               printk(KERN_DEBUG "dentry without hidden dentries : %.*s",
+               printk(KERN_DEBUG "unionfs: dentry without hidden "
+                      "dentries: %.*s",
                       dentry->d_name.len, dentry->d_name.name);
                goto out_free;
        }
index 579badabd7f8f1fcf9247af93399a8e2ca18561d..247c0c98e61c456b39b21139c21e72efce59044a 100644 (file)
@@ -447,8 +447,9 @@ static int unionfs_symlink(struct inode *dir, struct dentry *dentry,
                                if (IS_ERR(hidden_dentry))
                                        err = PTR_ERR(hidden_dentry);
 
-                               printk(KERN_DEBUG "hidden dentry NULL (or error)"
-                                      "for bindex = %d\n", bindex);
+                               printk(KERN_DEBUG "unionfs: hidden dentry "
+                                      "NULL (or error) for bindex = %d\n",
+                                      bindex);
                                continue;
                        }
                }
@@ -558,8 +559,8 @@ static int unionfs_mkdir(struct inode *parent, struct dentry *dentry, int mode)
                if (!hidden_dentry) {
                        hidden_dentry = create_parents(parent, dentry, bindex);
                        if (!hidden_dentry || IS_ERR(hidden_dentry)) {
-                               printk(KERN_DEBUG "hidden dentry NULL for "
-                                      "bindex = %d\n", bindex);
+                               printk(KERN_DEBUG "unionfs: hidden dentry "
+                                      " NULL for bindex = %d\n", bindex);
                                continue;
                        }
                }
@@ -600,7 +601,7 @@ static int unionfs_mkdir(struct inode *parent, struct dentry *dentry, int mode)
 
                err = make_dir_opaque(dentry, dbstart(dentry));
                if (err) {
-                       printk(KERN_ERR "mkdir: error creating "
+                       printk(KERN_ERR "unionfs: mkdir: error creating "
                               ".wh.__dir_opaque: %d\n", err);
                        goto out;
                }
@@ -682,8 +683,8 @@ static int unionfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
                if (!hidden_dentry) {
                        hidden_dentry = create_parents(dir, dentry, bindex);
                        if (IS_ERR(hidden_dentry)) {
-                               printk(KERN_DEBUG
-                                      "failed to create parents on %d, err = %ld\n",
+                               printk(KERN_DEBUG "unionfs: failed to create "
+                                      "parents on %d, err = %ld\n",
                                       bindex, PTR_ERR(hidden_dentry));
                                continue;
                        }
index 9b7c8611c093ec48017d0440e1c469c8ae9b8e61..e6a23f0a6e771bc6f1aa6e7b77c3dddb1b01099b 100644 (file)
@@ -191,8 +191,9 @@ struct dentry *unionfs_lookup_backend(struct dentry *dentry,
                                break;
                        }
                        err = -EIO;
-                       printk(KERN_NOTICE "EIO: Invalid whiteout entry type"
-                              " %d.\n", wh_hidden_dentry->d_inode->i_mode);
+                       printk(KERN_NOTICE "unionfs: EIO: invalid whiteout "
+                              "entry type %d.\n",
+                              wh_hidden_dentry->d_inode->i_mode);
                        dput(wh_hidden_dentry);
                        dput(first_hidden_dentry);
                        unionfs_mntput(first_dentry, first_dentry_offset);
index 899eee19109a2a79f68282139bef104054983305..95aa549e0298db41d02917bdf45c9325d4a2e391 100644 (file)
@@ -138,7 +138,7 @@ skip:
                /* Do nothing. */
                break;
        default:
-               printk(KERN_ERR "Invalid interpose flag passed!");
+               printk(KERN_ERR "unionfs: invalid interpose flag passed!");
                BUG();
        }
 
@@ -516,7 +516,7 @@ static int unionfs_read_super(struct super_block *sb, void *raw_data,
 
        if (!raw_data) {
                printk(KERN_WARNING
-                      "unionfs_read_super: missing data argument\n");
+                      "unionfsread_super: missing data argument\n");
                err = -EINVAL;
                goto out;
        }
@@ -524,7 +524,7 @@ static int unionfs_read_super(struct super_block *sb, void *raw_data,
        /* Allocate superblock private data */
        sb->s_fs_info = kzalloc(sizeof(struct unionfs_sb_info), GFP_KERNEL);
        if (!UNIONFS_SB(sb)) {
-               printk(KERN_WARNING "%s: out of memory\n", __FUNCTION__);
+               printk(KERN_WARNING "unionfs: read_super: out of memory\n");
                err = -ENOMEM;
                goto out;
        }
@@ -537,7 +537,7 @@ static int unionfs_read_super(struct super_block *sb, void *raw_data,
        hidden_root_info = unionfs_parse_options(sb, raw_data);
        if (IS_ERR(hidden_root_info)) {
                printk(KERN_WARNING
-                      "unionfs_read_super: error while parsing options "
+                      "unionfsread_super: error while parsing options "
                       "(err = %ld)\n", PTR_ERR(hidden_root_info));
                err = PTR_ERR(hidden_root_info);
                hidden_root_info = NULL;
index b9e731a3c3ea0c4b44f00980fa5b9e30ebfe62e9..3dc1dc2eab9348103651a18a036c3a2b8c6810f6 100644 (file)
@@ -210,8 +210,8 @@ struct filldir_node *find_filldir_node(struct unionfs_dir_state *rdstate,
                         * system is corrupted.
                         */
                        if (cursor->bindex == rdstate->bindex) {
-                               printk(KERN_DEBUG "Possible I/O error "
-                                      "unionfs_filldir: a file is duplicated "
+                               printk(KERN_DEBUG "unionfs: filldir: possible "
+                                      "I/O error: a file is duplicated "
                                       "in the same branch %d: %s\n",
                                       rdstate->bindex, cursor->name);
                        }
index 973a42f37789a1252cf727da41c8084b9f37c514..028656f4ae6ee14b719f3719ed7748a2143697fc 100644 (file)
@@ -38,8 +38,8 @@ static int do_rename(struct inode *old_dir, struct dentry *old_dentry,
                hidden_new_dentry =
                        create_parents(new_dentry->d_parent->d_inode, new_dentry, bindex);
                if (IS_ERR(hidden_new_dentry)) {
-                       printk(KERN_DEBUG "error creating directory tree for"
-                              " rename, bindex = %d, err = %ld\n",
+                       printk(KERN_DEBUG "unionfs: error creating directory "
+                              "tree for rename, bindex = %d, err = %ld\n",
                               bindex, PTR_ERR(hidden_new_dentry));
                        err = PTR_ERR(hidden_new_dentry);
                        goto out;
@@ -62,8 +62,8 @@ static int do_rename(struct inode *old_dir, struct dentry *old_dentry,
        if (hidden_wh_dentry->d_inode) {
                /* get rid of the whiteout that is existing */
                if (hidden_new_dentry->d_inode) {
-                       printk(KERN_WARNING "Both a whiteout and a dentry"
-                              " exist when doing a rename!\n");
+                       printk(KERN_WARNING "unionfs: both a whiteout and a "
+                              "dentry exist when doing a rename!\n");
                        err = -EIO;
 
                        dput(hidden_wh_dentry);
@@ -246,8 +246,8 @@ static int do_unionfs_rename(struct inode *old_dir,
                        set_dbopaque(old_dentry, bwh_old);
                else {
                        /* We can't fix anything now, so we cop-out and use -EIO. */
-                       printk(KERN_ERR "We can't create a whiteout for the "
-                              "source in rename!\n");
+                       printk(KERN_ERR "unionfs: can't create a whiteout for "
+                              "the source in rename!\n");
                        err = -EIO;
                }
        }
@@ -260,31 +260,31 @@ revert:
        /* Do revert here. */
        local_err = unionfs_refresh_hidden_dentry(new_dentry, old_bstart);
        if (local_err) {
-               printk(KERN_WARNING "Revert failed in rename: the new refresh "
-                      "failed.\n");
+               printk(KERN_WARNING "unionfs: revert failed in rename: "
+                      "the new refresh failed.\n");
                eio = -EIO;
        }
 
        local_err = unionfs_refresh_hidden_dentry(old_dentry, old_bstart);
        if (local_err) {
-               printk(KERN_WARNING "Revert failed in rename: the old refresh "
-                      "failed.\n");
+               printk(KERN_WARNING "unionfs: revert failed in rename: "
+                      "the old refresh failed.\n");
                eio = -EIO;
                goto revert_out;
        }
 
        if (!unionfs_lower_dentry_idx(new_dentry, bindex) ||
            !unionfs_lower_dentry_idx(new_dentry, bindex)->d_inode) {
-               printk(KERN_WARNING "Revert failed in rename: the object "
-                      "disappeared from under us!\n");
+               printk(KERN_WARNING "unionfs: revert failed in rename: "
+                      "the object disappeared from under us!\n");
                eio = -EIO;
                goto revert_out;
        }
 
        if (unionfs_lower_dentry_idx(old_dentry, bindex) &&
            unionfs_lower_dentry_idx(old_dentry, bindex)->d_inode) {
-               printk(KERN_WARNING "Revert failed in rename: the object was "
-                      "created underneath us!\n");
+               printk(KERN_WARNING "unionfs: revert failed in rename: "
+                      "the object was created underneath us!\n");
                eio = -EIO;
                goto revert_out;
        }
@@ -294,7 +294,7 @@ revert:
 
        /* If we can't fix it, then we cop-out with -EIO. */
        if (local_err) {
-               printk(KERN_WARNING "Revert failed in rename!\n");
+               printk(KERN_WARNING "unionfs: revert failed in rename!\n");
                eio = -EIO;
        }
 
index bef970b22066f374497e801ac7e3f2c8162bc4c1..a1e8ffa58810a646805ba83481df763816f37fd7 100644 (file)
@@ -35,7 +35,7 @@ int __init init_sioq(void)
                return 0;
 
        err = PTR_ERR(superio_workqueue);
-       printk(KERN_ERR "create_workqueue failed %d\n", err);
+       printk(KERN_ERR "unionfs: create_workqueue failed %d\n", err);
        superio_workqueue = NULL;
        return err;
 }
index 7bfd28d870bf4c7f59ffe65971474d08ece7fd9a..faea4907e1e3b130b169419a1ad17ce02424aadc 100644 (file)
@@ -55,8 +55,8 @@ int create_whiteout(struct dentry *dentry, int start)
                        hidden_dentry = create_parents(dentry->d_inode,
                                                       dentry, bindex);
                        if (!hidden_dentry || IS_ERR(hidden_dentry)) {
-                               printk(KERN_DEBUG "create_parents failed for "
-                                      "bindex = %d\n", bindex);
+                               printk(KERN_DEBUG "unionfs: create_parents "
+                                      "failed for bindex = %d\n", bindex);
                                continue;
                        }
                }
index 0319428c88170393d5d6233dabf4f5a443dbe42d..ceeb0df39ce63adcd72bf3f9b666a342a9480114 100644 (file)
@@ -30,8 +30,8 @@ static void unionfs_read_inode(struct inode *inode)
        struct unionfs_inode_info *info = UNIONFS_I(inode);
 
        if (!info) {
-               printk(KERN_ERR "No kernel memory when allocating inode "
-                      "private data!\n");
+               printk(KERN_ERR "unionfs: no kernel memory when allocating "
+                      "inode private data!\n");
                BUG();
        }
 
@@ -48,8 +48,8 @@ static void unionfs_read_inode(struct inode *inode)
        size = sbmax(inode->i_sb) * sizeof(struct inode *);
        info->lower_inodes = kzalloc(size, GFP_KERNEL);
        if (!info->lower_inodes) {
-               printk(KERN_ERR "No kernel memory when allocating lower-"
-                      "pointer array!\n");
+               printk(KERN_ERR "unionfs: no kernel memory when allocating "
+                      "lower-pointer array!\n");
                BUG();
        }