+#ifdef CONFIG_CPUSETS
+#if MAX_NUMNODES <= BITS_PER_LONG
+ nodemask_t dirty_nodes; /* nodes with dirty pages */
+#else
+ nodemask_t *dirty_nodes; /* pointer to mask, if dirty */
+#endif
+#endif
} __attribute__((aligned(sizeof(long))));
eek. Increasing the size of the address_space (and hence of the inode)
is a moderately big deal - there can be millions of these in memory.
@@ -72,6 +72,8 @@ struct writeback_control {
* so we use a single control to update them
*/
unsigned no_nrwrite_index_update:1;
+
+ nodemask_t *nodes; /* Nodemask to writeback */
This one doesn't get ifdefs?
+ nodemask_t *nodes = mapping->dirty_nodes;
+ int node = page_to_nid(page);
+
+ if (!nodes) {
+ nodes = kmalloc(sizeof(nodemask_t), GFP_ATOMIC);
erk, OK, called from __set_page_dirty, needs to be atomic.
What are the consequences when this allocation fails?