linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: Andreas Dilger <adilger@sun.com>
Cc: Oren Laadan <orenl@cs.columbia.edu>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-api@vger.kernel.org, Serge Hallyn <serue@us.ibm.com>,
	Ingo Molnar <mingo@elte.hu>,
	containers@lists.linux-foundation.org,
	Matt Helsley <matthltc@us.ibm.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [C/R v20][PATCH 46/96] c/r: add checkpoint operation for opened files of generic filesystems
Date: Wed, 17 Mar 2010 16:37:53 -0700	[thread overview]
Message-ID: <20100317233753.GJ3037@count0.beaverton.ibm.com> (raw)
In-Reply-To: <BA0C23DE-E2B5-42A9-8478-CE216D18A6C6@sun.com>

On Wed, Mar 17, 2010 at 03:09:00PM -0600, Andreas Dilger wrote:

<snip> (already responded to the first part)

> >static const struct vm_operations_struct nfs_file_vm_ops = {
> >	.fault = filemap_fault,
> >	.page_mkwrite = nfs_vm_page_mkwrite,
> >+#ifdef CONFIG_CHECKPOINT
> >+	.checkpoint = filemap_checkpoint,
> >+#endif
> >};
> 
> Why is this one conditional, but the others are not?

Something like this perhaps (untested, but it should work).

    Move empty filemap_checkpoint definition
    
    This makes the operation usable in the nfs vm operation structure
    and avoids the extra #ifdef.
    
    Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
    Cc: Andreas Dilger <adilger@sun.com>

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 4437ef9..c6f9090 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -578,9 +578,7 @@ out_unlock:
 static const struct vm_operations_struct nfs_file_vm_ops = {
 	.fault = filemap_fault,
 	.page_mkwrite = nfs_vm_page_mkwrite,
-#ifdef CONFIG_CHECKPOINT
 	.checkpoint = filemap_checkpoint,
-#endif
 };
 
 static int nfs_need_sync_write(struct file *filp, struct inode *inode)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 210d8e3..e9d9605 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1206,6 +1206,8 @@ extern int filemap_fault(struct vm_area_struct *, struct vm_fault *);
 #ifdef CONFIG_CHECKPOINT
 /* generic vm_area_ops exported for mapped files checkpoint */
 extern int filemap_checkpoint(struct ckpt_ctx *, struct vm_area_struct *);
+#else /* !CONFIG_CHECKPOINT */
+#define filemap_checkpoint NULL
 #endif
 
 /* mm/page-writeback.c */
diff --git a/mm/filemap.c b/mm/filemap.c
index 4ea28e6..bc98a15 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1678,8 +1678,6 @@ int filemap_restore(struct ckpt_ctx *ctx,
 	}
 	return ret;
 }
-#else /* !CONFIG_CHECKPOINT */
-#define filemap_checkpoint NULL
 #endif
 
 const struct vm_operations_struct generic_file_vm_ops = {

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2010-03-17 23:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1268842164-5590-1-git-send-email-orenl@cs.columbia.edu>
     [not found] ` <1268842164-5590-2-git-send-email-orenl@cs.columbia.edu>
     [not found]   ` <1268842164-5590-3-git-send-email-orenl@cs.columbia.edu>
     [not found]     ` <1268842164-5590-4-git-send-email-orenl@cs.columbia.edu>
     [not found]       ` <1268842164-5590-5-git-send-email-orenl@cs.columbia.edu>
     [not found]         ` <1268842164-5590-6-git-send-email-orenl@cs.columbia.edu>
     [not found]           ` <1268842164-5590-7-git-send-email-orenl@cs.columbia.edu>
     [not found]             ` <1268842164-5590-8-git-send-email-orenl@cs.columbia.edu>
     [not found]               ` <1268842164-5590-9-git-send-email-orenl@cs.columbia.edu>
     [not found]                 ` <1268842164-5590-10-git-send-email-orenl@cs.columbia.edu>
     [not found]                   ` <1268842164-5590-11-git-send-email-orenl@cs.columbia.edu>
     [not found]                     ` <1268842164-5590-12-git-send-email-orenl@cs.columbia.edu>
     [not found]                       ` <1268842164-5590-13-git-send-email-orenl@cs.columbia.edu>
     [not found]                         ` <1268842164-5590-14-git-send-email-orenl@cs.columbia.edu>
     [not found]                           ` <1268842164-5590-15-git-send-email-orenl@cs.columbia.edu>
     [not found]                             ` <1268842164-5590-16-git-send-email-orenl@cs.columbia.edu>
     [not found]                               ` <1268842164-5590-17-git-send-email-orenl@cs.columbia.edu>
     [not found]                                 ` <1268842164-5590-18-git-send-email-orenl@cs.columbia.edu>
     [not found]                                   ` <1268842164-5590-19-git-send-email-orenl@cs.columbia.edu>
     [not found]                                     ` <1268842164-5590-20-git-send-email-orenl@cs.columbia.edu>
     [not found]                                       ` <1268842164-5590-21-git-send-email-orenl@cs.columbia.edu>
     [not found]                                         ` <1268842164-5590-22-git-send-email-orenl@cs.columbia.edu>
     [not found]                                           ` <1268842164-5590-23-git-send-email-orenl@cs.columbia.edu>
     [not found]                                             ` <1268842164-5590-24-git-send-email-orenl@cs.columbia.edu>
     [not found]                                               ` <1268842164-5590-25-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                 ` <1268842164-5590-26-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                   ` <1268842164-5590-27-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                     ` <1268842164-5590-28-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                       ` <1268842164-5590-29-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                         ` <1268842164-5590-30-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                           ` <1268842164-5590-31-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                             ` <1268842164-5590-32-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                               ` <1268842164-5590-33-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                 ` <1268842164-5590-34-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                   ` <1268842164-5590-35-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                     ` <1268842164-5590-36-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                       ` <1268842164-5590-37-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                         ` <1268842164-5590-38-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                           ` <1268842164-5590-39-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                             ` <1268842164-5590-40-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                               ` <1268842164-5590-41-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                                 ` <1268842164-5590-42-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                                   ` <1268842164-5590-43-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                                     ` <1268842164-5590-44-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                                       ` <1268842164-5590-45-git-send-email-orenl@cs.columbia.edu>
     [not found]                                                                                         ` <1268842164-5590-46-git-send-email-orenl@cs.columbia.edu>
2010-03-17 16:08                                                                                           ` [C/R v20][PATCH 46/96] c/r: add checkpoint operation for opened files of generic filesystems Oren Laadan
2010-03-17 21:09                                                                                             ` Andreas Dilger
     [not found]                                                                                               ` <BA0C23DE-E2B5-42A9-8478-CE216D18A6C6-xsfywfwIY+M@public.gmane.org>
2010-03-17 23:25                                                                                                 ` Matt Helsley
2010-03-17 23:37                                                                                               ` Matt Helsley [this message]
2010-04-01 23:37 ` [C/R v20][PATCH 00/96] Linux Checkpoint-Restart - v20 Serge E. Hallyn
2010-04-01 23:57   ` Andrew Morton
2010-03-19  0:59 Oren Laadan
2010-03-19  0:59 ` [C/R v20][PATCH 46/96] c/r: add checkpoint operation for opened files of generic filesystems Oren Laadan

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=20100317233753.GJ3037@count0.beaverton.ibm.com \
    --to=matthltc@us.ibm.com \
    --cc=adilger@sun.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=orenl@cs.columbia.edu \
    --cc=serue@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).