From: Nicholas Krause <xerofoify@gmail.com>
To: clm@fb.com
Cc: jbacik@fb.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Remove certain calls for releasing page cache
Date: Wed, 30 Jul 2014 16:42:34 -0400 [thread overview]
Message-ID: <1406752954-26158-1-git-send-email-xerofoify@gmail.com> (raw)
This patch removes the lines for releasing the page cache in certain
files as this may aid in perfomance with writes in the compression
rountines of btrfs. Please note that this patch has not been tested
on my own hardware due to no compression based btrfs volumes of my
own.
Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
fs/btrfs/compression.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 1daea0b..b55b0e1 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -1,4 +1,5 @@
/*
+
* Copyright (C) 2008 Oracle. All rights reserved.
*
* This program is free software; you can redistribute it and/or
@@ -246,7 +247,6 @@ static noinline void end_compressed_writeback(struct inode *inode, u64 start,
}
for (i = 0; i < ret; i++) {
end_page_writeback(pages[i]);
- page_cache_release(pages[i]);
}
nr_pages -= ret;
index += ret;
@@ -293,21 +293,6 @@ static void end_compressed_bio_write(struct bio *bio, int err)
end_compressed_writeback(inode, cb->start, cb->len);
/* note, our inode could be gone now */
-
- /*
- * release the compressed pages, these came from alloc_page and
- * are not attached to the inode at all
- */
- index = 0;
- for (index = 0; index < cb->nr_pages; index++) {
- page = cb->compressed_pages[index];
- page->mapping = NULL;
- page_cache_release(page);
- }
-
- /* finally free the cb struct */
- kfree(cb->compressed_pages);
- kfree(cb);
out:
bio_put(bio);
}
--
1.9.1
next reply other threads:[~2014-07-30 20:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 20:42 Nicholas Krause [this message]
2014-07-30 20:47 ` Josef Bacik
2014-07-30 20:51 ` Zach Brown
2014-07-30 22:34 ` Nick Krause
2014-07-30 23:18 ` Josef Bacik
2014-07-30 23:30 ` Dave Airlie
2014-07-31 2:05 ` Nick Krause
2014-07-31 3:57 ` Dave Airlie
2014-07-31 4:14 ` Nick Krause
2014-07-31 10:11 ` Hugo Mills
2014-07-31 16:48 ` Nick Krause
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=1406752954-26158-1-git-send-email-xerofoify@gmail.com \
--to=xerofoify@gmail.com \
--cc=clm@fb.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®