aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Phillips <daniel@tux3.org>2014-02-15 23:05:40 +0900
committerDaniel Phillips <daniel@tux3.org>2014-02-15 23:05:40 +0900
commit8628329fc123969e50228385abdaf3d8e90ada91 (patch)
tree563cf1535cdc35d1e0d0d7dbd90ffa358e6d6560
parentb079cf19e4b2d4fc3add9f15d525c1e6f4cae74f (diff)
downloadlinux-tux3-8628329fc123969e50228385abdaf3d8e90ada91.tar.gz
tux3: Pass inode instead of mapping
Base work for adding allocation heuristics. Pass inode instead of mapping because it lets kernel and user space use the same allocation code. Makes user/buffer.c buffer emulation less standalone, but there are already intrusions of inodes. Moves the declaration into tux3.h and out of buffer.h, making the buffer system less modular but there is already filesystem specific code in it so it is going that way anyway. Signed-off-by: Daniel Phillips <d.phillips@partner.samsung.com> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-rw-r--r--fs/tux3/buffer.h4
-rw-r--r--fs/tux3/buffer_writeback.c5
-rw-r--r--fs/tux3/writeback.c2
3 files changed, 5 insertions, 6 deletions
diff --git a/fs/tux3/buffer.h b/fs/tux3/buffer.h
index 6f9ef13420c411..7b3421abeb660b 100644
--- a/fs/tux3/buffer.h
+++ b/fs/tux3/buffer.h
@@ -135,8 +135,8 @@ void tux3_iowait_init(struct iowait *iowait);
void tux3_iowait_wait(struct iowait *iowait);
int bufvec_io(int rw, struct bufvec *bufvec, block_t physical, unsigned count);
int bufvec_contig_add(struct bufvec *bufvec, struct buffer_head *buffer);
-int flush_list(struct address_space *mapping, struct tux3_iattr_data *idata,
- struct list_head *head, int req_flag);
+int flush_list(struct inode *inode, struct tux3_iattr_data *idata,
+ struct list_head *head, int req_flag);
int __tux3_volmap_io(int rw, struct bufvec *bufvec, block_t physical,
unsigned count);
int tux3_volmap_io(int rw, struct bufvec *bufvec);
diff --git a/fs/tux3/buffer_writeback.c b/fs/tux3/buffer_writeback.c
index 1baeb8ff9a3351..8f4a1a5cb60b03 100644
--- a/fs/tux3/buffer_writeback.c
+++ b/fs/tux3/buffer_writeback.c
@@ -780,10 +780,9 @@ static int buffer_index_cmp(void *priv, struct list_head *a,
/*
* Flush buffers in head
*/
-int flush_list(struct address_space *mapping, struct tux3_iattr_data *idata,
+int flush_list(struct inode *inode, struct tux3_iattr_data *idata,
struct list_head *head, int req_flag)
{
- struct inode *inode = mapping->host;
struct bufvec bufvec;
int err = 0;
@@ -792,7 +791,7 @@ int flush_list(struct address_space *mapping, struct tux3_iattr_data *idata,
if (list_empty(head))
return 0;
- bufvec_init(&bufvec, mapping, head, idata);
+ bufvec_init(&bufvec, mapping(inode), head, idata);
/* Sort by bufindex() */
list_sort(NULL, head, buffer_index_cmp);
diff --git a/fs/tux3/writeback.c b/fs/tux3/writeback.c
index a2369ccf03ca45..80a3a91277cd6e 100644
--- a/fs/tux3/writeback.c
+++ b/fs/tux3/writeback.c
@@ -482,7 +482,7 @@ static inline int tux3_flush_buffers(struct inode *inode,
return err;
/* Apply page caches */
- return flush_list(mapping(inode), idata, dirty_buffers, req_flag);
+ return flush_list(inode, idata, dirty_buffers, req_flag);
}
/*