aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/inode.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2010-01-28 04:46:16 -0500
committerBoaz Harrosh <bharrosh@panasas.com>2010-02-28 06:35:27 -0500
commit45d3abcb1a7388b2b97582e13bf9dd21784dcaa5 (patch)
treee957fdec303c073490c261999d6939c2ecf20352 /fs/exofs/inode.c
parent22ddc556380cf5645c52292b6d980766646eb864 (diff)
exofs: Move layout related members to a layout structure
* Abstract away those members in exofs_sb_info that are related/needed by a layout into a new exofs_layout structure. Embed it in exofs_sb_info. * At exofs_io_state receive/keep a pointer to an exofs_layout. No need for an exofs_sb_info pointer, all we need is at exofs_layout. * Change any usage of above exofs_sb_info members to their new name. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs/inode.c')
-rw-r--r--fs/exofs/inode.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index c88a0c5250cb..03189a958b33 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -65,7 +65,7 @@ static void _pcol_init(struct page_collect *pcol, unsigned expected_pages,
65 /* Create master bios on first Q, later on cloning, each clone will be 65 /* Create master bios on first Q, later on cloning, each clone will be
66 * allocated on it's destination Q 66 * allocated on it's destination Q
67 */ 67 */
68 pcol->req_q = osd_request_queue(sbi->s_ods[0]); 68 pcol->req_q = osd_request_queue(sbi->layout.s_ods[0]);
69 pcol->inode = inode; 69 pcol->inode = inode;
70 pcol->expected_pages = expected_pages; 70 pcol->expected_pages = expected_pages;
71 71
@@ -99,7 +99,7 @@ static int pcol_try_alloc(struct page_collect *pcol)
99 BIO_MAX_PAGES_KMALLOC); 99 BIO_MAX_PAGES_KMALLOC);
100 100
101 if (!pcol->ios) { /* First time allocate io_state */ 101 if (!pcol->ios) { /* First time allocate io_state */
102 int ret = exofs_get_io_state(pcol->sbi, &pcol->ios); 102 int ret = exofs_get_io_state(&pcol->sbi->layout, &pcol->ios);
103 103
104 if (ret) 104 if (ret)
105 return ret; 105 return ret;
@@ -872,7 +872,7 @@ static int exofs_get_inode(struct super_block *sb, struct exofs_i_info *oi,
872 int ret; 872 int ret;
873 873
874 *obj_size = ~0; 874 *obj_size = ~0;
875 ret = exofs_get_io_state(sbi, &ios); 875 ret = exofs_get_io_state(&sbi->layout, &ios);
876 if (unlikely(ret)) { 876 if (unlikely(ret)) {
877 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__); 877 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__);
878 return ret; 878 return ret;
@@ -1043,7 +1043,7 @@ static void create_done(struct exofs_io_state *ios, void *p)
1043 1043
1044 if (unlikely(ret)) { 1044 if (unlikely(ret)) {
1045 EXOFS_ERR("object=0x%llx creation faild in pid=0x%llx", 1045 EXOFS_ERR("object=0x%llx creation faild in pid=0x%llx",
1046 _LLU(exofs_oi_objno(oi)), _LLU(sbi->s_pid)); 1046 _LLU(exofs_oi_objno(oi)), _LLU(sbi->layout.s_pid));
1047 /*TODO: When FS is corrupted creation can fail, object already 1047 /*TODO: When FS is corrupted creation can fail, object already
1048 * exist. Get rid of this asynchronous creation, if exist 1048 * exist. Get rid of this asynchronous creation, if exist
1049 * increment the obj counter and try the next object. Until we 1049 * increment the obj counter and try the next object. Until we
@@ -1104,7 +1104,7 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
1104 1104
1105 mark_inode_dirty(inode); 1105 mark_inode_dirty(inode);
1106 1106
1107 ret = exofs_get_io_state(sbi, &ios); 1107 ret = exofs_get_io_state(&sbi->layout, &ios);
1108 if (unlikely(ret)) { 1108 if (unlikely(ret)) {
1109 EXOFS_ERR("exofs_new_inode: exofs_get_io_state failed\n"); 1109 EXOFS_ERR("exofs_new_inode: exofs_get_io_state failed\n");
1110 return ERR_PTR(ret); 1110 return ERR_PTR(ret);
@@ -1202,7 +1202,7 @@ static int exofs_update_inode(struct inode *inode, int do_sync)
1202 } else 1202 } else
1203 memcpy(fcb->i_data, oi->i_data, sizeof(fcb->i_data)); 1203 memcpy(fcb->i_data, oi->i_data, sizeof(fcb->i_data));
1204 1204
1205 ret = exofs_get_io_state(sbi, &ios); 1205 ret = exofs_get_io_state(&sbi->layout, &ios);
1206 if (unlikely(ret)) { 1206 if (unlikely(ret)) {
1207 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__); 1207 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__);
1208 goto free_args; 1208 goto free_args;
@@ -1286,7 +1286,7 @@ void exofs_delete_inode(struct inode *inode)
1286 1286
1287 clear_inode(inode); 1287 clear_inode(inode);
1288 1288
1289 ret = exofs_get_io_state(sbi, &ios); 1289 ret = exofs_get_io_state(&sbi->layout, &ios);
1290 if (unlikely(ret)) { 1290 if (unlikely(ret)) {
1291 EXOFS_ERR("%s: exofs_get_io_state failed\n", __func__); 1291 EXOFS_ERR("%s: exofs_get_io_state failed\n", __func__);
1292 return; 1292 return;