Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(readonly): Adding test cases for uzfs pool readonly support #289

Merged
merged 9 commits into from
Feb 13, 2020

Conversation

mynktl
Copy link
Member

@mynktl mynktl commented Feb 4, 2020

changes:

  • Adding support to make uzfs pool readonly
    To set pool readonly:
zpool  set io.openebs:readonly=on testp

To unset pool readonly:

zpool  set io.openebs:readonly=off testp

Test cases added for following scenarios:

  • If pool is set readonly then zrepl shouldn't scan this zvol, created on the pool, to make connection with target
  • if zvol was already connected while setting readonly mode then write/snapshot{prepare/create} will fail, but read will be allowed.

Fixes: openebs/openebs#2937
Signed-off-by: mayank mayank.patel@mayadata.io

Signed-off-by: mayank <mayank.patel@mayadata.io>
mayank and others added 2 commits February 10, 2020 16:05
@@ -297,6 +297,9 @@ struct spa {
taskq_t *spa_prefetch_taskq; /* Taskq for prefetch threads */
uint64_t spa_multihost; /* multihost aware (mmp) */
mmp_thread_t spa_mmp; /* multihost mmp thread */
#ifdef _UZFS

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we hadn't touched spa till now.. may be we never got that need.. can we also explore different way? if not possible, this is fine

module/zfs/spa.c Outdated Show resolved Hide resolved
module/zfs/spa.c Show resolved Hide resolved
module/zfs/spa.c Outdated Show resolved Hide resolved
module/zfs/spa.c Outdated Show resolved Hide resolved
Signed-off-by: mayank <mayank.patel@mayadata.io>
pawanpraka1
pawanpraka1 previously approved these changes Feb 12, 2020
Copy link
Member

@pawanpraka1 pawanpraka1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

Signed-off-by: mayank <mayank.patel@mayadata.io>
vishnuitta
vishnuitta previously approved these changes Feb 12, 2020
Copy link

@vishnuitta vishnuitta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes are good

Signed-off-by: mayank <mayank.patel@mayadata.io>
Copy link

@vishnuitta vishnuitta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes are good

@vishnuitta vishnuitta merged commit 0e9d648 into mayadata-io:develop Feb 13, 2020
@mynktl mynktl deleted the pool_readonly branch February 13, 2020 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cstor-pool process crashes in loop due to pool being full
3 participants