Whamcloud - gitweb
LU-5822 osd-ldiskfs: Correctly return OS_STATE_READONLY 63/12463/2
authorMatt Ezell <ezellma@ornl.gov>
Tue, 28 Oct 2014 20:49:23 +0000 (16:49 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 4 Dec 2014 20:22:08 +0000 (20:22 +0000)
Ensure that read-only devices correctly return their state so that
the health_check file will be accurate

Signed-off-by: Matt Ezell <ezellma@ornl.gov>
Change-Id: Iea38c924ca0d8cb543b77599019fc88fd8b58105
Reviewed-on: http://review.whamcloud.com/12463
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/osd-ldiskfs/osd_handler.c

index 2df7b10..290b31c 100644 (file)
@@ -1199,7 +1199,7 @@ int osd_statfs(const struct lu_env *env, struct dt_device *d,
                        osd->od_osfs_age = cfs_time_current_64();
                        statfs_pack(&osd->od_statfs, ksfs);
                        if (sb->s_flags & MS_RDONLY)
-                               sfs->os_state = OS_STATE_READONLY;
+                               osd->od_statfs.os_state = OS_STATE_READONLY;
                }
        }