Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Diego Calleja <diegocg@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] Fix call to blkdev_issue_discard
Date: Mon, 3 Nov 2008 16:29:09 +0100	[thread overview]
Message-ID: <20081103162909.1330a013@diego-desktop> (raw)

Commit 3e6053d76dcbd92b2f9f4ad5ece9bce83149523e adds a gfp_mask parameter
to blkdev_issue_discard, which breaks compilation in btrfs if BIO_RW_DISCARD
is config'ed in:

/home/diego/kernel/btrfs-unstable-standalone/extent-tree.c:1896: error:
too few arguments to function 'blkdev_issue_discard'

I added the parameter - GFP_KERNEL, which is what was the gfp_mask used
before this change.


Signed-off-by: Diego Calleja <diegocg@gmail.com>

Index: btrfs-unstable-standalone/extent-tree.c
===================================================================
--- btrfs-unstable-standalone.orig/extent-tree.c	2008-11-03 16:13:29.000000000 +0100
+++ btrfs-unstable-standalone/extent-tree.c	2008-11-03 16:18:23.000000000 +0100
@@ -1891,9 +1891,16 @@
 				map_length = num_bytes;
 
 			for (i = 0; i < multi->num_stripes; i++, stripe++) {
+			#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+				blkdev_issue_discard(stripe->dev->bdev,
+						     stripe->physical >> 9,
+						     map_length >> 9,
+						     GFP_KERNEL);
+			#else
 				blkdev_issue_discard(stripe->dev->bdev,
 						     stripe->physical >> 9,
 						     map_length >> 9);
+			#endif
 			}
 			kfree(multi);
 		}

                 reply	other threads:[~2008-11-03 15:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20081103162909.1330a013@diego-desktop \
    --to=diegocg@gmail.com \
    --cc=linux-btrfs@vger.kernel.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