Re: [RFC/PATCH] ext4: Clear the reservation window correctly with delayed allocation.

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

 



what if writepages went through 100 pages only and another 100 are left because
negative wbc->nr_to_write?

thanks, Alex

Aneesh Kumar K.V wrote:
@@ -1410,7 +1410,14 @@ out:
static int ext4_da_writepages(struct address_space *mapping,
                  struct writeback_control *wbc)
{
-    return mpage_da_writepages(mapping, wbc, ext4_da_get_block_write);
+    int retval;
+    retval = mpage_da_writepages(mapping, wbc, ext4_da_get_block_write);
+    if (!retval) {
+        /* if writepages is successfull discard the reservation */
+        ext4_discard_reservation(mapping->host);
+    }
+
+    return retval;
}

static void ext4_da_invalidatepage(struct page *page, unsigned long offset)


-aneesh
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux