From: Zheng Liu <gnehzuil.liu@gmail.com>
To: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Cc: Zheng Liu <wenqing.lz@taobao.com>
Subject: Re: [PATCH] libext2fs: do not print any error message from libext2fs
Date: Tue, 14 May 2013 00:53:56 +0800 [thread overview]
Message-ID: <20130513165356.GB14526@gmail.com> (raw)
In-Reply-To: <1367059481-6090-1-git-send-email-wenqing.lz@taobao.com>
On Sat, Apr 27, 2013 at 06:44:41PM +0800, Zheng Liu wrote:
> From: Zheng Liu <wenqing.lz@taobao.com>
>
> In libext2fs we don't print any error message form it except that OMIT_COM_ERR
> is defined. In lib/ext2fs/inline_data.c it doesn't obey this rule. So fix it.
> Meanwhile when we find an dir entry in inline data, we will print the message in
> debugfs rather than in libext2fs.
>
> Cc: "Theodore Ts'o" <tytso@mit.edu>
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Hi Ted,
As we discuss a while ago, until now, I only submit this patch for
improving the inline data patch series for e2fsprogs. IIRC, you have
mentioned that we need to check ext2_ext_attr_ibody_header in libext2fs
and improve some codes in e2fsck (Please let me know if I forgot
something). As you said, you also have some fixes for this, but it is
still too un-stable to send them out. So I think maybe we could find a
proper public place to share our works in order to avoid some duplicated
works. I am happy to improve these stuff. Please let me know if I need
to do something.
Thanks,
- Zheng
> ---
> [This patch is against pu branch of e2fsprogs tree]
>
> debugfs/htree.c | 5 ++++-
> lib/ext2fs/inline_data.c | 6 +++---
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/debugfs/htree.c b/debugfs/htree.c
> index ca39b4b..e042fd7 100644
> --- a/debugfs/htree.c
> +++ b/debugfs/htree.c
> @@ -388,8 +388,11 @@ void do_dirsearch(int argc, char *argv[])
> pb.len = strlen(pb.search_name);
>
> if (ext2fs_inode_has_inline_data(current_fs, inode)) {
> - ext2fs_inline_data_dirsearch(current_fs, inode,
> + errcode_t retval;
> + retval = ext2fs_inline_data_dirsearch(current_fs, inode,
> argv[2], strlen(argv[2]));
> + if (retval)
> + printf("Entry found at inline data\n");
> goto out;
> }
>
> diff --git a/lib/ext2fs/inline_data.c b/lib/ext2fs/inline_data.c
> index ea3736c..6d5cf52 100644
> --- a/lib/ext2fs/inline_data.c
> +++ b/lib/ext2fs/inline_data.c
> @@ -134,16 +134,16 @@ static int do_search_dir(ext2_filsys fs, void *start, unsigned int size,
> de = (struct ext2_dir_entry *)(start + offset);
> errcode = ext2fs_get_rec_len(fs, de, &rec_len);
> if (errcode) {
> +#ifndef OMIT_COM_ERR
> com_err("search_dir_inline_data", errcode,
> "while getting rec_len for inline data");
> +#endif
> return errcode;
> }
> if (de->inode &&
> len == (de->name_len & 0xFF) &&
> - strncmp(name, de->name, len) == 0) {
> - printf("Entry found at inline data\n");
> + strncmp(name, de->name, len) == 0)
> return 1;
> - }
> offset += rec_len;
> }
> return 0;
> --
> 1.7.12.rc2.18.g61b472e
>
next prev parent reply other threads:[~2013-05-13 16:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-27 10:44 [PATCH] libext2fs: do not print any error message from libext2fs Zheng Liu
2013-05-13 16:53 ` Zheng Liu [this message]
2013-05-21 2:36 ` Theodore Ts'o
2013-05-21 3:11 ` Zheng Liu
2013-05-21 3:26 ` My current version of the inline data patches Theodore Ts'o
2013-05-21 4:01 ` Zheng Liu
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=20130513165356.GB14526@gmail.com \
--to=gnehzuil.liu@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=wenqing.lz@taobao.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.