From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Minho Ban <mhban@samsung.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC/PATCH] PM / Hibernate : Add wait for disk detection if resume_file is MAJOR:MINOR style
Date: Wed, 09 May 2012 11:42:11 +0530 [thread overview]
Message-ID: <4FAA0ABB.8090906@linux.vnet.ibm.com> (raw)
In-Reply-To: <4FA78724.5000401@samsung.com>
On 05/07/2012 01:56 PM, Minho Ban wrote:
> name_to_dev_t is not enough to check device detection when the resume_file is
> MAJOR:MINOR format. get_gendisk is needed in that case.
>
> Signed-off-by: Minho Ban <mhban@samsung.com>
> ---
> kernel/power/hibernate.c | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index e09dfbf..27efaef 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -25,6 +25,8 @@
> #include <linux/freezer.h>
> #include <linux/gfp.h>
> #include <linux/syscore_ops.h>
> +#include <linux/ctype.h>
> +#include <linux/genhd.h>
> #include <scsi/scsi_scan.h>
>
> #include "power.h"
> @@ -749,6 +751,14 @@ static int software_resume(void)
> }
> }
>
> + /* name_to_dev_t is ineffective if resume_file comes in major:minor
> + * format */
Nitpick: Multi-line comments should be of the form:
/*
* name_to_dev_t is ineffective....
* ....... major:minor format
*/
Regards,
Srivatsa S. Bhat
> + if (isdigit(resume_file[0]) && resume_wait) {
> + int partno;
> + while (!get_gendisk(swsusp_resume_device, &partno))
> + msleep(10);
> + }
> +
> Check_image:
> pr_debug("PM: Hibernation image partition %d:%d present\n",
> MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device));
next prev parent reply other threads:[~2012-05-09 6:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 8:26 [RFC/PATCH] PM / Hibernate : Add wait for disk detection if resume_file is MAJOR:MINOR style Minho Ban
2012-05-07 19:39 ` Rafael J. Wysocki
2012-05-07 23:56 ` Minho Ban
2012-05-08 21:28 ` Rafael J. Wysocki
2012-05-09 8:03 ` Minho Ban
2012-05-09 6:12 ` Srivatsa S. Bhat [this message]
2012-05-09 8:03 ` Minho Ban
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=4FAA0ABB.8090906@linux.vnet.ibm.com \
--to=srivatsa.bhat@linux.vnet.ibm.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mhban@samsung.com \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
/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