NFS: start printks w/ NFS: even if __func__ shown
authorWeston Andros Adamson <dros@netapp.com>
Thu, 26 Jan 2012 18:32:23 +0000 (13:32 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 6 Feb 2012 23:48:00 +0000 (18:48 -0500)
This patch addresses printks that have some context to show that they are
from fs/nfs/, but for the sake of consistency now start with NFS:

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
14 files changed:
fs/nfs/blocklayout/blocklayoutdev.c
fs/nfs/blocklayout/blocklayoutdm.c
fs/nfs/callback.c
fs/nfs/callback_xdr.c
fs/nfs/idmap.c
fs/nfs/inode.c
fs/nfs/nfs4filelayout.c
fs/nfs/nfs4filelayoutdev.c
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c
fs/nfs/nfs4xdr.c
fs/nfs/objlayout/objio_osd.c
fs/nfs/objlayout/objlayout.c
fs/nfs/pnfs.c

index 94ed978860c0fea4800abc35b9100112edef9f96..b48f782a94aded0a39a08f3533b8e843a30587af 100644 (file)
@@ -46,7 +46,7 @@ static int decode_sector_number(__be32 **rp, sector_t *sp)
 
        *rp = xdr_decode_hyper(*rp, &s);
        if (s & 0x1ff) {
-               printk(KERN_WARNING "%s: sector not aligned\n", __func__);
+               printk(KERN_WARNING "NFS: %s: sector not aligned\n", __func__);
                return -1;
        }
        *sp = s >> SECTOR_SHIFT;
index 970490f556debfa233e80885d7d0d10b4b426659..a0f588fa49c14d9cedda52f8dd349b4cd5266bb2 100644 (file)
@@ -91,7 +91,7 @@ static void nfs4_blk_metadev_release(struct pnfs_block_dev *bdev)
        dprintk("%s Releasing\n", __func__);
        rv = nfs4_blkdev_put(bdev->bm_mdev);
        if (rv)
-               printk(KERN_ERR "%s nfs4_blkdev_put returns %d\n",
+               printk(KERN_ERR "NFS: %s nfs4_blkdev_put returns %d\n",
                                __func__, rv);
 
        dev_remove(bdev->net, bdev->bm_mdev->bd_dev);
index d81040a7efc47b6387781befec99e33c8c1ec096..4a122ae71762fcbecda409e8c83ceaefa78a16fb 100644 (file)
@@ -85,7 +85,7 @@ nfs4_callback_svc(void *vrqstp)
                }
                if (err < 0) {
                        if (err != preverr) {
-                               printk(KERN_WARNING "%s: unexpected error "
+                               printk(KERN_WARNING "NFS: %s: unexpected error "
                                        "from svc_recv (%d)\n", __func__, err);
                                preverr = err;
                        }
index d50b2742f23baeb20d54c44d6919ed126faf74c8..2f45aa717423afa60bd816093e3696cfe74cc11d 100644 (file)
@@ -73,7 +73,7 @@ static __be32 *read_buf(struct xdr_stream *xdr, int nbytes)
 
        p = xdr_inline_decode(xdr, nbytes);
        if (unlikely(p == NULL))
-               printk(KERN_WARNING "NFSv4 callback reply buffer overflowed!\n");
+               printk(KERN_WARNING "NFS: NFSv4 callback reply buffer overflowed!\n");
        return p;
 }
 
@@ -155,7 +155,7 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound
                return status;
        /* We do not like overly long tags! */
        if (hdr->taglen > CB_OP_TAGLEN_MAXSZ - 12) {
-               printk("NFSv4 CALLBACK %s: client sent tag of length %u\n",
+               printk("NFS: NFSv4 CALLBACK %s: client sent tag of length %u\n",
                                __func__, hdr->taglen);
                return htonl(NFS4ERR_RESOURCE);
        }
@@ -167,7 +167,7 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound
        if (hdr->minorversion <= 1) {
                hdr->cb_ident = ntohl(*p++); /* ignored by v4.1 */
        } else {
-               printk(KERN_WARNING "%s: NFSv4 server callback with "
+               printk(KERN_WARNING "NFS: %s: NFSv4 server callback with "
                        "illegal minor version %u!\n",
                        __func__, hdr->minorversion);
                return htonl(NFS4ERR_MINOR_VERS_MISMATCH);
index 91b1e2a82146b5a8aa5f221d42179820d3d8720f..62264e0b1ddb04e1184f7b131a80398a85eb5369 100644 (file)
@@ -558,11 +558,13 @@ static int __rpc_pipefs_event(struct nfs_client *clp, unsigned long event,
                         * here.
                         */
                        if (rpc_rmdir(parent))
-                               printk(KERN_ERR "%s: failed to remove clnt dir!\n", __func__);
+                               printk(KERN_ERR "NFS: %s: failed to remove "
+                                       "clnt dir!\n", __func__);
                }
                break;
        default:
-               printk(KERN_ERR "%s: unknown event: %ld\n", __func__, event);
+               printk(KERN_ERR "NFS: %s: unknown event: %ld\n", __func__,
+                       event);
                return -ENOTSUPP;
        }
        return err;
index d2c760e193f4cbf2eb24d01db4c7308f4b86405c..028464bcbe0e3c164e2ae7b65b99581aae0d0189 100644 (file)
@@ -1407,7 +1407,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
        /*
         * Big trouble! The inode has become a different object.
         */
-       printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n",
+       printk(KERN_DEBUG "NFS: %s: inode %ld mode changed, %07o to %07o\n",
                        __func__, inode->i_ino, inode->i_mode, fattr->mode);
  out_err:
        /*
index 9a058b8c288898983a4ca25f29c00742b1c4f27a..79be7acc9bae4ff03b59b269ac7e2a86c725a163 100644 (file)
@@ -367,7 +367,8 @@ filelayout_write_pagelist(struct nfs_write_data *data, int sync)
        idx = nfs4_fl_calc_ds_index(lseg, j);
        ds = nfs4_fl_prepare_ds(lseg, idx);
        if (!ds) {
-               printk(KERN_ERR "%s: prepare_ds failed, use MDS\n", __func__);
+               printk(KERN_ERR "NFS: %s: prepare_ds failed, use MDS\n",
+                       __func__);
                set_bit(lo_fail_bit(IOMODE_RW), &lseg->pls_layout->plh_flags);
                set_bit(lo_fail_bit(IOMODE_READ), &lseg->pls_layout->plh_flags);
                return PNFS_NOT_ATTEMPTED;
@@ -797,7 +798,8 @@ static int filelayout_initiate_commit(struct nfs_write_data *data, int how)
        idx = calc_ds_index_from_commit(lseg, data->ds_commit_index);
        ds = nfs4_fl_prepare_ds(lseg, idx);
        if (!ds) {
-               printk(KERN_ERR "%s: prepare_ds failed, use MDS\n", __func__);
+               printk(KERN_ERR "NFS: %s: prepare_ds failed, use MDS\n",
+                       __func__);
                set_bit(lo_fail_bit(IOMODE_RW), &lseg->pls_layout->plh_flags);
                set_bit(lo_fail_bit(IOMODE_READ), &lseg->pls_layout->plh_flags);
                prepare_to_resend_writes(data);
index 6eb59b044bfcdfd5674c2129a4c39c792772a404..80fce8dade2e39a55be3a50ef7d1091514d19930 100644 (file)
@@ -554,7 +554,7 @@ decode_device(struct inode *ino, struct pnfs_device *pdev, gfp_t gfp_flags)
        cnt = be32_to_cpup(p);
        dprintk("%s stripe count  %d\n", __func__, cnt);
        if (cnt > NFS4_PNFS_MAX_STRIPE_CNT) {
-               printk(KERN_WARNING "%s: stripe count %d greater than "
+               printk(KERN_WARNING "NFS: %s: stripe count %d greater than "
                       "supported maximum %d\n", __func__,
                        cnt, NFS4_PNFS_MAX_STRIPE_CNT);
                goto out_err_free_scratch;
@@ -585,7 +585,7 @@ decode_device(struct inode *ino, struct pnfs_device *pdev, gfp_t gfp_flags)
        num = be32_to_cpup(p);
        dprintk("%s ds_num %u\n", __func__, num);
        if (num > NFS4_PNFS_MAX_MULTI_CNT) {
-               printk(KERN_WARNING "%s: multipath count %d greater than "
+               printk(KERN_WARNING "NFS: %s: multipath count %d greater than "
                        "supported maximum %d\n", __func__,
                        num, NFS4_PNFS_MAX_MULTI_CNT);
                goto out_err_free_stripe_indices;
@@ -593,7 +593,7 @@ decode_device(struct inode *ino, struct pnfs_device *pdev, gfp_t gfp_flags)
 
        /* validate stripe indices are all < num */
        if (max_stripe_index >= num) {
-               printk(KERN_WARNING "%s: stripe index %u >= num ds %u\n",
+               printk(KERN_WARNING "NFS: %s: stripe index %u >= num ds %u\n",
                        __func__, max_stripe_index, num);
                goto out_err_free_stripe_indices;
        }
@@ -687,7 +687,7 @@ decode_and_add_device(struct inode *inode, struct pnfs_device *dev, gfp_t gfp_fl
 
        new = decode_device(inode, dev, gfp_flags);
        if (!new) {
-               printk(KERN_WARNING "%s: Could not decode or add device\n",
+               printk(KERN_WARNING "NFS: %s: Could not decode or add device\n",
                        __func__);
                return NULL;
        }
@@ -836,7 +836,7 @@ nfs4_fl_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx)
        struct nfs4_pnfs_ds *ds = dsaddr->ds_list[ds_idx];
 
        if (ds == NULL) {
-               printk(KERN_ERR "%s: No data server for offset index %d\n",
+               printk(KERN_ERR "NFS: %s: No data server for offset index %d\n",
                        __func__, ds_idx);
                return NULL;
        }
index 34e525549f850d8648183eda8337b94b6340b089..482ed97189c9c292f205e21fd270bc0336c84146 100644 (file)
@@ -4584,7 +4584,8 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock
        /* Note: we always want to sleep here! */
        request->fl_flags = fl_flags | FL_SLEEP;
        if (do_vfs_lock(request->fl_file, request) < 0)
-               printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", __func__);
+               printk(KERN_WARNING "NFS: %s: VFS is out of sync with lock "
+                       "manager!\n", __func__);
 out_unlock:
        up_read(&nfsi->rwsem);
 out:
@@ -4664,8 +4665,8 @@ int nfs4_lock_delegation_recall(struct nfs4_state *state, struct file_lock *fl)
                err = _nfs4_do_setlk(state, F_SETLK, fl, NFS_LOCK_NEW);
                switch (err) {
                        default:
-                               printk(KERN_ERR "%s: unhandled error %d.\n",
-                                               __func__, err);
+                               printk(KERN_ERR "NFS: %s: unhandled error "
+                                       "%d.\n", __func__, err);
                        case 0:
                        case -ESTALE:
                                goto out;
index b43a65d7faca5229c210cdb455d798eee715f7f6..4e37818a34ef79f83f93bc0852856c64e816fa17 100644 (file)
@@ -1138,8 +1138,8 @@ static int nfs4_reclaim_locks(struct nfs4_state *state, const struct nfs4_state_
                        case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION:
                                goto out;
                        default:
-                               printk(KERN_ERR "%s: unhandled error %d. Zeroing state\n",
-                                               __func__, status);
+                               printk(KERN_ERR "NFS: %s: unhandled error %d. "
+                                       "Zeroing state\n", __func__, status);
                        case -ENOMEM:
                        case -NFS4ERR_DENIED:
                        case -NFS4ERR_RECLAIM_BAD:
@@ -1185,8 +1185,8 @@ restart:
                                spin_lock(&state->state_lock);
                                list_for_each_entry(lock, &state->lock_states, ls_locks) {
                                        if (!(lock->ls_flags & NFS_LOCK_INITIALIZED))
-                                               printk("%s: Lock reclaim failed!\n",
-                                                       __func__);
+                                               printk("NFS: %s: Lock reclaim "
+                                                       "failed!\n", __func__);
                                }
                                spin_unlock(&state->state_lock);
                                nfs4_put_open_state(state);
@@ -1195,8 +1195,8 @@ restart:
                }
                switch (status) {
                        default:
-                               printk(KERN_ERR "%s: unhandled error %d. Zeroing state\n",
-                                               __func__, status);
+                               printk(KERN_ERR "NFS: %s: unhandled error %d. "
+                                       "Zeroing state\n", __func__, status);
                        case -ENOENT:
                        case -ENOMEM:
                        case -ESTALE:
index 2adcc979e5df87959035ceb837478b3ac5280e5c..ae783436671265d60d0bfa71d999cd114c6d32fa 100644 (file)
@@ -4468,8 +4468,8 @@ static int decode_first_pnfs_layout_type(struct xdr_stream *xdr,
                return 0;
        }
        if (num > 1)
-               printk(KERN_INFO "%s: Warning: Multiple pNFS layout drivers "
-                       "per filesystem not supported\n", __func__);
+               printk(KERN_INFO "NFS: %s: Warning: Multiple pNFS layout "
+                       "drivers per filesystem not supported\n", __func__);
 
        /* Decode and set first layout type, move xdr->p past unused types */
        p = xdr_inline_decode(xdr, num * 4);
@@ -5290,8 +5290,8 @@ static int decode_chan_attrs(struct xdr_stream *xdr,
        attrs->max_reqs = be32_to_cpup(p++);
        nr_attrs = be32_to_cpup(p);
        if (unlikely(nr_attrs > 1)) {
-               printk(KERN_WARNING "%s: Invalid rdma channel attrs count %u\n",
-                       __func__, nr_attrs);
+               printk(KERN_WARNING "NFS: %s: Invalid rdma channel attrs "
+                       "count %u\n", __func__, nr_attrs);
                return -EINVAL;
        }
        if (nr_attrs == 1) {
@@ -5448,7 +5448,7 @@ static int decode_getdevicelist(struct xdr_stream *xdr,
        dprintk("%s: num_dev %d\n", __func__, res->num_devs);
 
        if (res->num_devs > NFS4_PNFS_GETDEVLIST_MAXNUM) {
-               printk(KERN_ERR "%s too many result dev_num %u\n",
+               printk(KERN_ERR "NFS: %s too many result dev_num %u\n",
                                __func__, res->num_devs);
                return -EIO;
        }
index 55d01280a6098264cc5e6d7133c72347e392d109..405a62bdb9b49c68b4219cad59e377e754c6f577 100644 (file)
@@ -582,10 +582,10 @@ objlayout_init(void)
 
        if (ret)
                printk(KERN_INFO
-                       "%s: Registering OSD pNFS Layout Driver failed: error=%d\n",
+                       "NFS: %s: Registering OSD pNFS Layout Driver failed: error=%d\n",
                        __func__, ret);
        else
-               printk(KERN_INFO "%s: Registered OSD pNFS Layout Driver\n",
+               printk(KERN_INFO "NFS: %s: Registered OSD pNFS Layout Driver\n",
                        __func__);
        return ret;
 }
@@ -594,7 +594,7 @@ static void __exit
 objlayout_exit(void)
 {
        pnfs_unregister_layoutdriver(&objlayout_type);
-       printk(KERN_INFO "%s: Unregistered OSD pNFS Layout Driver\n",
+       printk(KERN_INFO "NFS: %s: Unregistered OSD pNFS Layout Driver\n",
               __func__);
 }
 
index b3c29039f5b893e69058cd404547d218cfa8dff8..2bd185277adbf0aa965a4e049b38478e47f6f02c 100644 (file)
@@ -490,9 +490,9 @@ encode_accumulated_error(struct objlayout *objlay, __be32 *p)
                        if (!ioerr->oer_errno)
                                continue;
 
-                       printk(KERN_ERR "%s: err[%d]: errno=%d is_write=%d "
-                               "dev(%llx:%llx) par=0x%llx obj=0x%llx "
-                               "offset=0x%llx length=0x%llx\n",
+                       printk(KERN_ERR "NFS: %s: err[%d]: errno=%d "
+                               "is_write=%d dev(%llx:%llx) par=0x%llx "
+                               "obj=0x%llx offset=0x%llx length=0x%llx\n",
                                __func__, i, ioerr->oer_errno,
                                ioerr->oer_iswrite,
                                _DEVID_LO(&ioerr->oer_component.oid_device_id),
index 92927878c2f8f9fb6568a2c5c54faeb1e8cd50cc..a53421604bc480c23b97df71c4af256a7ff52b76 100644 (file)
@@ -101,8 +101,8 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh,
                goto out_no_driver;
        if (!(server->nfs_client->cl_exchange_flags &
                 (EXCHGID4_FLAG_USE_NON_PNFS | EXCHGID4_FLAG_USE_PNFS_MDS))) {
-               printk(KERN_ERR "%s: id %u cl_exchange_flags 0x%x\n", __func__,
-                      id, server->nfs_client->cl_exchange_flags);
+               printk(KERN_ERR "NFS: %s: id %u cl_exchange_flags 0x%x\n",
+                       __func__, id, server->nfs_client->cl_exchange_flags);
                goto out_no_driver;
        }
        ld_type = find_pnfs_driver(id);
@@ -122,8 +122,8 @@ set_pnfs_layoutdriver(struct nfs_server *server, const struct nfs_fh *mntfh,
        server->pnfs_curr_ld = ld_type;
        if (ld_type->set_layoutdriver
            && ld_type->set_layoutdriver(server, mntfh)) {
-               printk(KERN_ERR "%s: Error initializing pNFS layout driver %u.\n",
-                               __func__, id);
+               printk(KERN_ERR "NFS: %s: Error initializing pNFS layout "
+                       "driver %u.\n", __func__, id);
                module_put(ld_type->owner);
                goto out_no_driver;
        }
@@ -143,11 +143,11 @@ pnfs_register_layoutdriver(struct pnfs_layoutdriver_type *ld_type)
        struct pnfs_layoutdriver_type *tmp;
 
        if (ld_type->id == 0) {
-               printk(KERN_ERR "%s id 0 is reserved\n", __func__);
+               printk(KERN_ERR "NFS: %s id 0 is reserved\n", __func__);
                return status;
        }
        if (!ld_type->alloc_lseg || !ld_type->free_lseg) {
-               printk(KERN_ERR "%s Layout driver must provide "
+               printk(KERN_ERR "NFS: %s Layout driver must provide "
                       "alloc_lseg and free_lseg.\n", __func__);
                return status;
        }
@@ -160,7 +160,7 @@ pnfs_register_layoutdriver(struct pnfs_layoutdriver_type *ld_type)
                dprintk("%s Registering id:%u name:%s\n", __func__, ld_type->id,
                        ld_type->name);
        } else {
-               printk(KERN_ERR "%s Module with id %d already loaded!\n",
+               printk(KERN_ERR "NFS: %s Module with id %d already loaded!\n",
                        __func__, ld_type->id);
        }
        spin_unlock(&pnfs_spinlock);