diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2011-09-28 04:39:59 -0400 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2011-10-03 11:07:50 -0400 |
commit | 5bf696dad4beecb6174e701c97e1f2574e6a2c96 (patch) | |
tree | b4cfd7e00a61310aaf5ac90e670c840184fc115d /fs/exofs/super.c | |
parent | de74b05ace743b4a7aefad9e9b33ff899979b34a (diff) |
exofs: Rename struct ore_components comps => oc
ore_components already has a comps member so this leads
to things like comps->comps which is annoying. the name oc
was already used in new code. So rename all old usage of
ore_components comps => ore_components oc.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs/super.c')
-rw-r--r-- | fs/exofs/super.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/fs/exofs/super.c b/fs/exofs/super.c index afe79ee088ad..babb1958f6f0 100644 --- a/fs/exofs/super.c +++ b/fs/exofs/super.c | |||
@@ -266,7 +266,7 @@ static int __sbi_read_stats(struct exofs_sb_info *sbi) | |||
266 | struct ore_io_state *ios; | 266 | struct ore_io_state *ios; |
267 | int ret; | 267 | int ret; |
268 | 268 | ||
269 | ret = ore_get_io_state(&sbi->layout, &sbi->comps, &ios); | 269 | ret = ore_get_io_state(&sbi->layout, &sbi->oc, &ios); |
270 | if (unlikely(ret)) { | 270 | if (unlikely(ret)) { |
271 | EXOFS_ERR("%s: ore_get_io_state failed.\n", __func__); | 271 | EXOFS_ERR("%s: ore_get_io_state failed.\n", __func__); |
272 | return ret; | 272 | return ret; |
@@ -321,7 +321,7 @@ int exofs_sbi_write_stats(struct exofs_sb_info *sbi) | |||
321 | struct ore_io_state *ios; | 321 | struct ore_io_state *ios; |
322 | int ret; | 322 | int ret; |
323 | 323 | ||
324 | ret = ore_get_io_state(&sbi->layout, &sbi->comps, &ios); | 324 | ret = ore_get_io_state(&sbi->layout, &sbi->oc, &ios); |
325 | if (unlikely(ret)) { | 325 | if (unlikely(ret)) { |
326 | EXOFS_ERR("%s: ore_get_io_state failed.\n", __func__); | 326 | EXOFS_ERR("%s: ore_get_io_state failed.\n", __func__); |
327 | return ret; | 327 | return ret; |
@@ -360,7 +360,7 @@ static int exofs_sync_fs(struct super_block *sb, int wait) | |||
360 | struct exofs_sb_info *sbi; | 360 | struct exofs_sb_info *sbi; |
361 | struct exofs_fscb *fscb; | 361 | struct exofs_fscb *fscb; |
362 | struct ore_comp one_comp; | 362 | struct ore_comp one_comp; |
363 | struct ore_components comps; | 363 | struct ore_components oc; |
364 | struct ore_io_state *ios; | 364 | struct ore_io_state *ios; |
365 | int ret = -ENOMEM; | 365 | int ret = -ENOMEM; |
366 | 366 | ||
@@ -378,9 +378,9 @@ static int exofs_sync_fs(struct super_block *sb, int wait) | |||
378 | * the writeable info is set in exofs_sbi_write_stats() above. | 378 | * the writeable info is set in exofs_sbi_write_stats() above. |
379 | */ | 379 | */ |
380 | 380 | ||
381 | exofs_init_comps(&comps, &one_comp, sbi, EXOFS_SUPER_ID); | 381 | exofs_init_comps(&oc, &one_comp, sbi, EXOFS_SUPER_ID); |
382 | 382 | ||
383 | ret = ore_get_io_state(&sbi->layout, &comps, &ios); | 383 | ret = ore_get_io_state(&sbi->layout, &oc, &ios); |
384 | if (unlikely(ret)) | 384 | if (unlikely(ret)) |
385 | goto out; | 385 | goto out; |
386 | 386 | ||
@@ -431,17 +431,17 @@ static void _exofs_print_device(const char *msg, const char *dev_path, | |||
431 | 431 | ||
432 | static void exofs_free_sbi(struct exofs_sb_info *sbi) | 432 | static void exofs_free_sbi(struct exofs_sb_info *sbi) |
433 | { | 433 | { |
434 | while (sbi->comps.numdevs) { | 434 | while (sbi->oc.numdevs) { |
435 | int i = --sbi->comps.numdevs; | 435 | int i = --sbi->oc.numdevs; |
436 | struct osd_dev *od = sbi->comps.ods[i]; | 436 | struct osd_dev *od = sbi->oc.ods[i]; |
437 | 437 | ||
438 | if (od) { | 438 | if (od) { |
439 | sbi->comps.ods[i] = NULL; | 439 | sbi->oc.ods[i] = NULL; |
440 | osduld_put_device(od); | 440 | osduld_put_device(od); |
441 | } | 441 | } |
442 | } | 442 | } |
443 | if (sbi->comps.ods != sbi->_min_one_dev) | 443 | if (sbi->oc.ods != sbi->_min_one_dev) |
444 | kfree(sbi->comps.ods); | 444 | kfree(sbi->oc.ods); |
445 | kfree(sbi); | 445 | kfree(sbi); |
446 | } | 446 | } |
447 | 447 | ||
@@ -468,7 +468,7 @@ static void exofs_put_super(struct super_block *sb) | |||
468 | msecs_to_jiffies(100)); | 468 | msecs_to_jiffies(100)); |
469 | } | 469 | } |
470 | 470 | ||
471 | _exofs_print_device("Unmounting", NULL, sbi->comps.ods[0], | 471 | _exofs_print_device("Unmounting", NULL, sbi->oc.ods[0], |
472 | sbi->one_comp.obj.partition); | 472 | sbi->one_comp.obj.partition); |
473 | 473 | ||
474 | bdi_destroy(&sbi->bdi); | 474 | bdi_destroy(&sbi->bdi); |
@@ -623,7 +623,7 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info *sbi, | |||
623 | return -ENOMEM; | 623 | return -ENOMEM; |
624 | } | 624 | } |
625 | 625 | ||
626 | sbi->comps.numdevs = 0; | 626 | sbi->oc.numdevs = 0; |
627 | 627 | ||
628 | comp.obj.partition = sbi->one_comp.obj.partition; | 628 | comp.obj.partition = sbi->one_comp.obj.partition; |
629 | comp.obj.id = EXOFS_DEVTABLE_ID; | 629 | comp.obj.id = EXOFS_DEVTABLE_ID; |
@@ -648,13 +648,13 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info *sbi, | |||
648 | goto out; | 648 | goto out; |
649 | 649 | ||
650 | if (likely(numdevs > 1)) { | 650 | if (likely(numdevs > 1)) { |
651 | unsigned size = numdevs * sizeof(sbi->comps.ods[0]); | 651 | unsigned size = numdevs * sizeof(sbi->oc.ods[0]); |
652 | 652 | ||
653 | /* Twice bigger table: See exofs_init_comps() and below | 653 | /* Twice bigger table: See exofs_init_comps() and below |
654 | * comment | 654 | * comment |
655 | */ | 655 | */ |
656 | sbi->comps.ods = kzalloc(size + size - 1, GFP_KERNEL); | 656 | sbi->oc.ods = kzalloc(size + size - 1, GFP_KERNEL); |
657 | if (unlikely(!sbi->comps.ods)) { | 657 | if (unlikely(!sbi->oc.ods)) { |
658 | EXOFS_ERR("ERROR: faild allocating Device array[%d]\n", | 658 | EXOFS_ERR("ERROR: faild allocating Device array[%d]\n", |
659 | numdevs); | 659 | numdevs); |
660 | ret = -ENOMEM; | 660 | ret = -ENOMEM; |
@@ -681,8 +681,8 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info *sbi, | |||
681 | * line. We always keep them in device-table order. | 681 | * line. We always keep them in device-table order. |
682 | */ | 682 | */ |
683 | if (fscb_od && osduld_device_same(fscb_od, &odi)) { | 683 | if (fscb_od && osduld_device_same(fscb_od, &odi)) { |
684 | sbi->comps.ods[i] = fscb_od; | 684 | sbi->oc.ods[i] = fscb_od; |
685 | ++sbi->comps.numdevs; | 685 | ++sbi->oc.numdevs; |
686 | fscb_od = NULL; | 686 | fscb_od = NULL; |
687 | continue; | 687 | continue; |
688 | } | 688 | } |
@@ -695,8 +695,8 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info *sbi, | |||
695 | goto out; | 695 | goto out; |
696 | } | 696 | } |
697 | 697 | ||
698 | sbi->comps.ods[i] = od; | 698 | sbi->oc.ods[i] = od; |
699 | ++sbi->comps.numdevs; | 699 | ++sbi->oc.numdevs; |
700 | 700 | ||
701 | /* Read the fscb of the other devices to make sure the FS | 701 | /* Read the fscb of the other devices to make sure the FS |
702 | * partition is there. | 702 | * partition is there. |
@@ -719,7 +719,7 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info *sbi, | |||
719 | out: | 719 | out: |
720 | kfree(dt); | 720 | kfree(dt); |
721 | if (likely(!ret)) { | 721 | if (likely(!ret)) { |
722 | unsigned numdevs = sbi->comps.numdevs; | 722 | unsigned numdevs = sbi->oc.numdevs; |
723 | 723 | ||
724 | if (unlikely(fscb_od)) { | 724 | if (unlikely(fscb_od)) { |
725 | EXOFS_ERR("ERROR: Bad device-table container device not present\n"); | 725 | EXOFS_ERR("ERROR: Bad device-table container device not present\n"); |
@@ -732,7 +732,7 @@ out: | |||
732 | * starting at this device. See exofs_init_comps() | 732 | * starting at this device. See exofs_init_comps() |
733 | */ | 733 | */ |
734 | for (i = 0; i < numdevs - 1; ++i) | 734 | for (i = 0; i < numdevs - 1; ++i) |
735 | sbi->comps.ods[i + numdevs] = sbi->comps.ods[i]; | 735 | sbi->oc.ods[i + numdevs] = sbi->oc.ods[i]; |
736 | } | 736 | } |
737 | return ret; | 737 | return ret; |
738 | } | 738 | } |
@@ -783,10 +783,10 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
783 | sbi->one_comp.obj.partition = opts->pid; | 783 | sbi->one_comp.obj.partition = opts->pid; |
784 | sbi->one_comp.obj.id = 0; | 784 | sbi->one_comp.obj.id = 0; |
785 | exofs_make_credential(sbi->one_comp.cred, &sbi->one_comp.obj); | 785 | exofs_make_credential(sbi->one_comp.cred, &sbi->one_comp.obj); |
786 | sbi->comps.numdevs = 1; | 786 | sbi->oc.numdevs = 1; |
787 | sbi->comps.single_comp = EC_SINGLE_COMP; | 787 | sbi->oc.single_comp = EC_SINGLE_COMP; |
788 | sbi->comps.comps = &sbi->one_comp; | 788 | sbi->oc.comps = &sbi->one_comp; |
789 | sbi->comps.ods = sbi->_min_one_dev; | 789 | sbi->oc.ods = sbi->_min_one_dev; |
790 | 790 | ||
791 | /* fill in some other data by hand */ | 791 | /* fill in some other data by hand */ |
792 | memset(sb->s_id, 0, sizeof(sb->s_id)); | 792 | memset(sb->s_id, 0, sizeof(sb->s_id)); |
@@ -835,7 +835,7 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
835 | if (unlikely(ret)) | 835 | if (unlikely(ret)) |
836 | goto free_sbi; | 836 | goto free_sbi; |
837 | } else { | 837 | } else { |
838 | sbi->comps.ods[0] = od; | 838 | sbi->oc.ods[0] = od; |
839 | } | 839 | } |
840 | 840 | ||
841 | __sbi_read_stats(sbi); | 841 | __sbi_read_stats(sbi); |
@@ -875,7 +875,7 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
875 | goto free_sbi; | 875 | goto free_sbi; |
876 | } | 876 | } |
877 | 877 | ||
878 | _exofs_print_device("Mounting", opts->dev_name, sbi->comps.ods[0], | 878 | _exofs_print_device("Mounting", opts->dev_name, sbi->oc.ods[0], |
879 | sbi->one_comp.obj.partition); | 879 | sbi->one_comp.obj.partition); |
880 | return 0; | 880 | return 0; |
881 | 881 | ||
@@ -924,7 +924,7 @@ static int exofs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
924 | uint64_t used = ULLONG_MAX; | 924 | uint64_t used = ULLONG_MAX; |
925 | int ret; | 925 | int ret; |
926 | 926 | ||
927 | ret = ore_get_io_state(&sbi->layout, &sbi->comps, &ios); | 927 | ret = ore_get_io_state(&sbi->layout, &sbi->oc, &ios); |
928 | if (ret) { | 928 | if (ret) { |
929 | EXOFS_DBGMSG("ore_get_io_state failed.\n"); | 929 | EXOFS_DBGMSG("ore_get_io_state failed.\n"); |
930 | return ret; | 930 | return ret; |