All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fred Isaman <iisaman@netapp.com>
To: Benny Halevy <bhalevy@panasas.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/3] SQUASHME: pnfs: filelayout: print_ds should use dprintk
Date: Wed, 27 Oct 2010 16:17:18 -0400	[thread overview]
Message-ID: <AANLkTinsRNKCOQZjH4kYTTou-a+J02dM8nB=WL_xu7Wb@mail.gmail.com> (raw)
In-Reply-To: <4CC8863B.3080504@panasas.com>

On Wed, Oct 27, 2010 at 4:06 PM, Benny Halevy <bhalevy@panasas.com> wrote:
> On 2010-10-27 21:49, Fred Isaman wrote:
>> The change to printk was in response to Trond's complaint about
>> successive dprintks.
>>
>> Instead, the following would work:
>>
>>
>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>> index 5f52e6f..2ce393c 100644
>> --- a/fs/nfs/nfs4filelayout.c
>> +++ b/fs/nfs/nfs4filelayout.c
>> @@ -585,7 +585,8 @@ filelayout_commit(struct nfs_write_data *data, int sync)
>>               }
>
> If we're going this way, the ifdebug could cover the following
> printout as well...
>

Did you mean preceding printout?  By the way - the complaint about
successive dprintks was regarding
print_ds_list repeatedly calling print_ds, which at the time used dprintk.

Fred

> Benny
>
>>               dprintk("%s: Initiating commit: %llu USE DS:\n",
>>                       __func__, file_offset);
>> -             print_ds(ds);
>> +             ifdebug(FACILITY)
>> +                     print_ds(ds);
>>
>>               /* Send COMMIT to data server */
>>               nfs_initiate_commit(dsdata, clnt, call_ops, sync);
>>
>>
>> Fred
>>
>> On Wed, Oct 27, 2010 at 2:24 PM, Benny Halevy <bhalevy@panasas.com> wrote:
>>> rather than printk to prevent printouts in non-debug mode
>>> currently happening in filelayout_commit
>>>
>>> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
>>> ---
>>>  fs/nfs/nfs4filelayoutdev.c |    9 ++++-----
>>>  1 files changed, 4 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
>>> index 1f0ab62..de47112 100644
>>> --- a/fs/nfs/nfs4filelayoutdev.c
>>> +++ b/fs/nfs/nfs4filelayoutdev.c
>>> @@ -53,10 +53,10 @@ void
>>>  print_ds(struct nfs4_pnfs_ds *ds)
>>>  {
>>>        if (ds == NULL) {
>>> -               printk("%s NULL device\n", __func__);
>>> +               dprintk("%s NULL device\n", __func__);
>>>                return;
>>>        }
>>> -       printk("        ip_addr %x port %hu\n"
>>> +       dprintk("        ip_addr %x port %hu\n"
>>>                "        ref count %d\n"
>>>                "        client %p\n"
>>>                "        cl_exchange_flags %x\n",
>>> @@ -71,7 +71,7 @@ print_ds_list(struct nfs4_file_layout_dsaddr *dsaddr)
>>>        int i;
>>>
>>>        ifdebug(FACILITY) {
>>> -               printk("%s dsaddr->ds_num %d\n", __func__,
>>> +               dprintk("%s dsaddr->ds_num %d\n", __func__,
>>>                       dsaddr->ds_num);
>>>                for (i = 0; i < dsaddr->ds_num; i++)
>>>                        print_ds(dsaddr->ds_list[i]);
>>> @@ -211,8 +211,7 @@ static void
>>>  destroy_ds(struct nfs4_pnfs_ds *ds)
>>>  {
>>>        dprintk("--> %s\n", __func__);
>>> -       ifdebug(FACILITY)
>>> -               print_ds(ds);
>>> +       print_ds(ds);
>>>
>>>        if (ds->ds_clp)
>>>                nfs_put_client(ds->ds_clp);
>>> --
>>> 1.7.2.3
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2010-10-27 20:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 18:21 [PATCH 1/4] pnfs fixes Benny Halevy
2010-10-27 18:22 ` [PATCH 1/1] SQUASHME: pnfsd-files: update layout stateid properly Benny Halevy
2010-10-27 18:23 ` [PATCH 1/1] pnfs: do not change layout stateid when dropping layouts Benny Halevy
2010-10-27 18:24 ` [PATCH 2/3] pnfs: mark page with error in readpage_async_filler when crossing lsegs Benny Halevy
2010-10-27 18:24 ` [PATCH 3/3] SQUASHME: pnfs: filelayout: print_ds should use dprintk Benny Halevy
2010-10-27 19:49   ` Fred Isaman
2010-10-27 20:06     ` Benny Halevy
2010-10-27 20:17       ` Fred Isaman [this message]
2010-10-27 21:00         ` Benny Halevy
2010-10-27 21:23           ` Trond Myklebust
2010-10-27 21:29             ` Benny Halevy
2010-10-27 21:32               ` Trond Myklebust
2010-10-27 21:42                 ` Benny Halevy
2010-10-28 13:11                   ` Benny Halevy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinsRNKCOQZjH4kYTTou-a+J02dM8nB=WL_xu7Wb@mail.gmail.com' \
    --to=iisaman@netapp.com \
    --cc=bhalevy@panasas.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.