diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-02-23 20:41:33 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-02-23 20:43:49 +0000 |
commit | adc750ab6600980ba98d77d371efb07b38886f30 (patch) | |
tree | 104141f710f4aa50e8e587e212074bb982ee07c1 /mgmt.c | |
parent | 8757c6458e67e9ab20f9a049a9a68f51b3229816 (diff) | |
download | cmogstored-adc750ab6600980ba98d77d371efb07b38886f30.tar.gz |
Items in the low-priority fsck queue could trigger a assertion failure during graceful shutdown due to improper handling of the MOG_NEXT_IGNORE state in mog_mgmt_quit_step(). However, using the fsck queue in graceful shutdown (which is single-threaded) is probably a bad idea anyways, as the fsck digest could monopolize other requests. So give no special handling to fsck digest queries during graceful shutdown. This only affects users running fsck with checksumming enabled during a graceful shutdown of cmogstored. For checksums users, it is recommended to stop fsck from the trackers and wait for all tracker queues to drain before upgrading cmogstored (and using graceful shutdown on the old cmogstored).
Diffstat (limited to 'mgmt.c')
-rw-r--r-- | mgmt.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -251,11 +251,14 @@ void mog_mgmt_quit_step(struct mog_fd *mfd) switch (mgmt_queue_step(mfd)) { case MOG_NEXT_WAIT_RD: if (mgmt->forward || mgmt->rbuf) { + /* something is in progress, do not drop it */ mog_idleq_push(q, mfd, MOG_QEV_RD); return; } /* fall-through */ case MOG_NEXT_IGNORE: /* no new iostat watchers during shutdown */ + assert(mgmt->prio == MOG_PRIO_NONE && "bad prio"); + /* fall-through */ case MOG_NEXT_CLOSE: mog_nr_active_at_quit--; mgmt_close(mfd); |