From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/1] ocfs2: adds mlogs to aops.c -V2
Date: Tue, 21 Jul 2009 18:16:23 -0700 [thread overview]
Message-ID: <4A666867.7090503@oracle.com> (raw)
In-Reply-To: <4A666616.90509@oracle.com>
Wengang,
Idea is to print stuff that will be useful. Instead of printing
all args, you can always prepend a 3 char code... flg=0x%x to
identify the args that you are printing. Remember the printk
buffer is limited.
Thanks for taking on this task.
Sunil
Wengang Wang wrote:
> Hi Joel,
>
> Joel Becker wrote:
>
>
>> On Tue, Jul 21, 2009 at 10:52:52AM +0800, Wengang Wang wrote:
>>
>>> @@ -565,6 +603,8 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock,
>>> * Any write past EOF is not allowed because we'd be extending.
>>> */
>>> if (create && (iblock + max_blocks) > inode_blocks) {
>>> + mlog(0, "writting to EOF(%llu/%llu)\n",
>>> + iblock + max_blocks, inode_blocks);
>>> ret = -EIO;
>>> goto bail;
>>> }
>>>
>> iblock is a sector_t and requires a cast.
>>
>>
>>> @@ -1542,8 +1659,14 @@ int ocfs2_size_fits_inline_data(struct buffer_head *di_bh, u64 new_size)
>>> {
>>> struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
>>>
>>> - if (new_size <= le16_to_cpu(di->id2.i_data.id_count))
>>> + mlog_entry("(%llu, %llu)\n",
>>> + di_bh->b_blocknr, (unsigned long long)new_size);
>>>
>> b_blocknr is a sector_t and requires a cast.
>>
>>
>>> @@ -1655,6 +1786,10 @@ int ocfs2_write_begin_nolock(struct address_space *mapping,
>>> handle_t *handle;
>>> struct ocfs2_extent_tree et;
>>>
>>> + mlog_entry("(0x%p, %lld, %u, %u, .., %llu, %lu)\n",
>>> + mapping, pos, len, flags, di_bh->b_blocknr,
>>> + mmap_page->index);
>>>
>> b_blocknr is a sector_t and requies a cast. Also, I'd rather you
>> printed the **pagep pointer instead of "..". Sure, it's a pointer to a
>> pointer that we're going to fill, but it might be useful to know. Please
>> do this all the places you are printing "..".
>>
>
> Sorry for the miss of cast on sector_t.
> it's Ok to print the pointer address. reposting will come soon.
>
> regards,
> wengang.
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel
>
next prev parent reply other threads:[~2009-07-22 1:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 2:52 [Ocfs2-devel] [PATCH 1/1] ocfs2: adds mlogs to aops.c -V2 Wengang Wang
2009-07-21 21:31 ` Joel Becker
2009-07-22 1:06 ` Wengang Wang
2009-07-22 1:16 ` Sunil Mushran [this message]
2009-07-22 1:53 ` Wengang Wang
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=4A666867.7090503@oracle.com \
--to=sunil.mushran@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/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.