The move of the ofd module from using proc to sysfs
changed sync_journal to syncjournal. We want to return
to using sync_journal to allow for interoperability
between old and new versions of Lustre and Lustre tests.
Test-Parameters: trivial testlist=replay-single
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I6c9c61d64110bd7f3274aba0c831d5f6df0ab1f3
Reviewed-on: https://review.whamcloud.com/33582
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
* \retval 0 on success
* \retval negative value on error
*/
* \retval 0 on success
* \retval negative value on error
*/
-static ssize_t syncjournal_show(struct kobject *kobj, struct attribute *attr,
+static ssize_t sync_journal_show(struct kobject *kobj, struct attribute *attr,
char *buf)
{
struct obd_device *obd = container_of(kobj, struct obd_device,
obd_kset.kobj);
struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
char *buf)
{
struct obd_device *obd = container_of(kobj, struct obd_device,
obd_kset.kobj);
struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
- return sprintf(buf, "%u\n", ofd->ofd_syncjournal);
+ return sprintf(buf, "%u\n", ofd->ofd_sync_journal);
* \retval \a count on success
* \retval negative number on error
*/
* \retval \a count on success
* \retval negative number on error
*/
-static ssize_t syncjournal_store(struct kobject *kobj, struct attribute *attr,
+static ssize_t sync_journal_store(struct kobject *kobj, struct attribute *attr,
const char *buffer, size_t count)
{
struct obd_device *obd = container_of(kobj, struct obd_device,
const char *buffer, size_t count)
{
struct obd_device *obd = container_of(kobj, struct obd_device,
return rc;
spin_lock(&ofd->ofd_flags_lock);
return rc;
spin_lock(&ofd->ofd_flags_lock);
- ofd->ofd_syncjournal = val;
+ ofd->ofd_sync_journal = val;
ofd_slc_set(ofd);
spin_unlock(&ofd->ofd_flags_lock);
return count;
}
ofd_slc_set(ofd);
spin_unlock(&ofd->ofd_flags_lock);
return count;
}
-LUSTRE_RW_ATTR(syncjournal);
+LUSTRE_RW_ATTR(sync_journal);
/* This must be longer than the longest string below */
#define SYNC_STATES_MAXLEN 16
/* This must be longer than the longest string below */
#define SYNC_STATES_MAXLEN 16
&lustre_attr_client_cache_seconds.attr,
&lustre_attr_degraded.attr,
&lustre_attr_fstype.attr,
&lustre_attr_client_cache_seconds.attr,
&lustre_attr_degraded.attr,
&lustre_attr_fstype.attr,
- &lustre_attr_syncjournal.attr,
+ &lustre_attr_sync_journal.attr,
&lustre_attr_sync_lock_cancel.attr,
&lustre_attr_soft_sync_limit.attr,
&lustre_attr_lfsck_speed_limit.attr,
&lustre_attr_sync_lock_cancel.attr,
&lustre_attr_soft_sync_limit.attr,
&lustre_attr_lfsck_speed_limit.attr,
spin_lock_init(&m->ofd_flags_lock);
m->ofd_raid_degraded = 0;
m->ofd_checksum_t10pi_enforce = 0;
spin_lock_init(&m->ofd_flags_lock);
m->ofd_raid_degraded = 0;
m->ofd_checksum_t10pi_enforce = 0;
- m->ofd_syncjournal = 0;
+ m->ofd_sync_journal = 0;
ofd_slc_set(m);
m->ofd_soft_sync_limit = OFD_SOFT_SYNC_LIMIT_DEFAULT;
ofd_slc_set(m);
m->ofd_soft_sync_limit = OFD_SOFT_SYNC_LIMIT_DEFAULT;
spinlock_t ofd_flags_lock;
unsigned long ofd_raid_degraded:1,
/* sync journal on writes */
spinlock_t ofd_flags_lock;
unsigned long ofd_raid_degraded:1,
/* sync journal on writes */
/* Protected by ofd_lastid_rwsem. */
ofd_lastid_rebuilding:1,
ofd_record_fid_accessed:1,
/* Protected by ofd_lastid_rwsem. */
ofd_lastid_rebuilding:1,
ofd_record_fid_accessed:1,
* sync on lock cancel if it is not enabled already. */
static inline void ofd_slc_set(struct ofd_device *ofd)
{
* sync on lock cancel if it is not enabled already. */
static inline void ofd_slc_set(struct ofd_device *ofd)
{
- if (ofd->ofd_syncjournal == 1)
+ if (ofd->ofd_sync_journal == 1)
ofd->ofd_lut.lut_sync_lock_cancel = NEVER_SYNC_ON_CANCEL;
else if (ofd->ofd_lut.lut_sync_lock_cancel == NEVER_SYNC_ON_CANCEL)
ofd->ofd_lut.lut_sync_lock_cancel = ALWAYS_SYNC_ON_CANCEL;
ofd->ofd_lut.lut_sync_lock_cancel = NEVER_SYNC_ON_CANCEL;
else if (ofd->ofd_lut.lut_sync_lock_cancel == NEVER_SYNC_ON_CANCEL)
ofd->ofd_lut.lut_sync_lock_cancel = ALWAYS_SYNC_ON_CANCEL;
if (IS_ERR(th))
GOTO(out, rc = PTR_ERR(th));
if (IS_ERR(th))
GOTO(out, rc = PTR_ERR(th));
- th->th_sync |= ofd->ofd_syncjournal;
+ th->th_sync |= ofd->ofd_sync_journal;
if (th->th_sync == 0) {
for (i = 0; i < niocount; i++) {
if (!(lnb[i].lnb_flags & OBD_BRW_ASYNC)) {
if (th->th_sync == 0) {
for (i = 0; i < niocount; i++) {
if (!(lnb[i].lnb_flags & OBD_BRW_ASYNC)) {