bz-18539 and osc_statfs_interpret
Form bugzilla the approach recommended to set the oscc_flag was to use the MDS-side code in osc_statfs_interpret(). First question is why this approach instead of defining a new osc_import_event. On the OST we will be setting the state with something like:
/proc/fs/lustre/obdfilter/*/degraded_raid
So the flow will be from the OST to the OSC. Just curious why it is not done this way.
The second question deals with setting the oscc_flag fromosc_statfs_interpret. After looking at the code I noticed oscc_flag is a field in struct osc_creator. The only place I could find osc_creator was in struct client_obd which I could only find in struct obd_device or struct osc_brw_async_args which we are not using for this.
Now for struct osc_async_args which is passed intoosc_statfs_interpret just contains a pointer to struct obd_info. Looking at the components for struct obd_info I don't see a easy way to get the proper obd_device to get the client_obd I need. What am I missing?
Quoted 9 lines · James Simmons
Form bugzilla the approach recommended to set the
oscc_flagwas to use the MDS-side code inosc_statfs_interpret(). First question is why this approach instead of defining a newosc_import_event. On the OST we will be setting the state with something like:
/proc/fs/lustre/obdfilter/*/degraded_raidSo the flow will be from the OST to the OSC. Just curious why it is not done this way.
The reason osc_import_event can't be used is that this is only a local event notification. The "degraded_raid" state will be set on the OSS node, while the osc_import_event can only be called on the client node (in this case the MDS).
Quoted 9 lines
The second question deals with setting the
oscc_flagfromosc_statfs_interpret. After looking at the code I noticedoscc_flagis a field in structosc_creator. The only place I could findosc_creatorwas in structclient_obdwhich I could only find in structobd_deviceor structosc_brw_async_argswhich we are not using for this.
Now for structosc_async_argswhich is passed intoosc_statfs_interpretjust contains a pointer to structobd_info. Looking at the components for structobd_infoI don't see a easy way to get the properobd_deviceto get theclient_obdI need. What am I missing?
You can get the struct obd_device pointer for the OBD in question via req->rq_export->exp_obd and get the proper struct osc_creator from that
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.