[PATCH] reiser4: port for linux-4.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Flag BIO_UPTODATE gone.

Signed-off-by: Edward Shishkin <edward.shishkin@xxxxxxxxx>
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;
 

[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux