From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: Dave Hansen <dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: [PATCH] better file error debugging
Date: Sat, 27 Jun 2009 06:33:22 -0400 [thread overview]
Message-ID: <4A45F572.1010506@cs.columbia.edu> (raw)
In-Reply-To: <1245959485.31856.74.camel@nimitz>
Dave Hansen wrote:
> This should give a nice message with symbol names for when we have an
> open file that doesn't have an f_op->checkpoint.
>
> Something along the lines of:
>
> [1133:c/r:checkpoint_file] file operations have no checkpoint handler:tty_open+0x0/0x24
>
Nice, thanks.
Added with another ckpt_debug() for the unlinked file case.
Oren.
> diff --git a/checkpoint/files.c b/checkpoint/files.c
> index 5be7d1b..566fc9a 100644
> --- a/checkpoint/files.c
> +++ b/checkpoint/files.c
> @@ -193,8 +193,11 @@ int checkpoint_file(struct ckpt_ctx *ctx, void *ptr)
> {
> struct file *file = (struct file *) ptr;
>
> - if (!file->f_op || !file->f_op->checkpoint)
> + if (!file->f_op || !file->f_op->checkpoint) {
> + ckpt_debug("file operations have no checkpoint handler: %pS\n",
> + file->f_op);
> return -EBADF;
> + }
> if (d_unhashed(file->f_dentry) && !IS_ROOT(file->f_dentry))
> return -EBADF;
> return file->f_op->checkpoint(ctx, file);
>
>
>
> -- Dave
>
>
prev parent reply other threads:[~2009-06-27 10:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 19:51 [PATCH] better file error debugging Dave Hansen
2009-06-27 10:33 ` Oren Laadan [this message]
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=4A45F572.1010506@cs.columbia.edu \
--to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox