From: Edward Shishkin <edward.shishkin@gmail.com>
To: Reiserfs development mailing list <reiserfs-devel@vger.kernel.org>
Subject: [PATCH] reiser4: port for linux-4.3
Date: Mon, 16 Nov 2015 09:54:30 +0100 [thread overview]
Message-ID: <564999C6.2010608@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 84 bytes --]
Flag BIO_UPTODATE gone.
Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
[-- Attachment #2: reiser4-port-for-4.3.patch --]
[-- Type: text/x-patch, Size: 3452 bytes --]
diff -urN linux-4.2.3/fs/reiser4/flush_queue.c linux-4.3/fs/reiser4/flush_queue.c
--- linux-4.2.3/fs/reiser4/flush_queue.c 2015-11-16 09:45:01.160671244 +0100
+++ linux-4.3/fs/reiser4/flush_queue.c 2015-11-16 09:39:45.717199841 +0100
@@ -392,9 +392,11 @@
return list_empty_careful(&atom->flush_queues);
}
#endif
-/* Bio i/o completion routine for reiser4 write operations. */
-static void
-end_io_handler(struct bio *bio, int err)
+
+/*
+ * Bio i/o completion routine for reiser4 write operations
+ */
+static void end_io_handler(struct bio *bio)
{
int i;
int nr_errors = 0;
@@ -409,7 +411,7 @@
for (i = 0; i < bio->bi_vcnt; i += 1) {
struct page *pg = bio->bi_io_vec[i].bv_page;
- if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) {
+ if (bio->bi_error) {
SetPageError(pg);
nr_errors++;
}
diff -urN linux-4.2.3/fs/reiser4/page_cache.c linux-4.3/fs/reiser4/page_cache.c
--- linux-4.2.3/fs/reiser4/page_cache.c 2015-11-16 09:45:01.165671236 +0100
+++ linux-4.3/fs/reiser4/page_cache.c 2015-11-16 09:39:45.723199830 +0100
@@ -324,16 +324,15 @@
mpage_end_io_read() would also do. But it's static.
*/
-static void
-end_bio_single_page_read(struct bio *bio, int err UNUSED_ARG)
+static void end_bio_single_page_read(struct bio *bio)
{
struct page *page;
page = bio->bi_io_vec[0].bv_page;
- if (test_bit(BIO_UPTODATE, &bio->bi_flags)) {
+ if (!bio->bi_error)
SetPageUptodate(page);
- } else {
+ else {
ClearPageUptodate(page);
SetPageError(page);
}
@@ -346,14 +345,13 @@
mpage_end_io_write() would also do. But it's static.
*/
-static void
-end_bio_single_page_write(struct bio *bio, int err UNUSED_ARG)
+static void end_bio_single_page_write(struct bio *bio)
{
struct page *page;
page = bio->bi_io_vec[0].bv_page;
- if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
+ if (bio->bi_error)
SetPageError(page);
end_page_writeback(page);
bio_put(bio);
diff -urN linux-4.2.3/fs/reiser4/status_flags.c linux-4.3/fs/reiser4/status_flags.c
--- linux-4.2.3/fs/reiser4/status_flags.c 2015-11-16 09:45:01.189671197 +0100
+++ linux-4.3/fs/reiser4/status_flags.c 2015-11-16 09:39:45.748199785 +0100
@@ -16,11 +16,11 @@
/* This is our end I/O handler that marks page uptodate if IO was successful.
It also unconditionally unlocks the page, so we can see that io was done.
We do not free bio, because we hope to reuse that. */
-static void reiser4_status_endio(struct bio *bio, int err)
+static void reiser4_status_endio(struct bio *bio)
{
- if (test_bit(BIO_UPTODATE, &bio->bi_flags)) {
+ if (!bio->bi_error)
SetPageUptodate(bio->bi_io_vec->bv_page);
- } else {
+ else {
ClearPageUptodate(bio->bi_io_vec->bv_page);
SetPageError(bio->bi_io_vec->bv_page);
}
diff -urN linux-4.2.3/fs/reiser4/wander.c linux-4.3/fs/reiser4/wander.c
--- linux-4.2.3/fs/reiser4/wander.c 2015-11-16 09:45:01.194671189 +0100
+++ linux-4.3/fs/reiser4/wander.c 2015-11-16 09:39:45.755199773 +0100
@@ -714,7 +714,6 @@
{
struct super_block *super = reiser4_get_current_sb();
int write_op = ( flags & WRITEOUT_BARRIER ) ? WRITE_FLUSH_FUA : WRITE;
- int max_blocks;
jnode *cur = first;
reiser4_block_nr block;
@@ -723,11 +722,10 @@
assert("zam-570", nr > 0);
block = *block_p;
- max_blocks = min(bio_get_nr_vecs(super->s_bdev), BIO_MAX_PAGES);
while (nr > 0) {
struct bio *bio;
- int nr_blocks = min(nr, max_blocks);
+ int nr_blocks = min(nr, BIO_MAX_PAGES);
int i;
int nr_used;
reply other threads:[~2015-11-16 8:54 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=564999C6.2010608@gmail.com \
--to=edward.shishkin@gmail.com \
--cc=reiserfs-devel@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;
as well as URLs for NNTP newsgroup(s).