Discussion:
extensible_dataset feature flag
Christopher Siden
2013-10-01 21:08:48 UTC
Permalink
http://cr.illumos.org/~webrev/csiden/illumos-extensible/

Work by Matt Ahrens. These changes introduce a new extensible_dataset
feature flag. Enabling the flag has no user-visible effect at the
moment since it exists solely for other feature flags to depend on. We
are pushing it upstream without any consumers because Joyent is
working on a new feature flag that will use it. We have some internal
feature flags that use extensible_dataset that aren't ready to push
upstream yet, but we've used them to test that the extensible_dataset
feature flag works as expected.

Chris
Ned Bass
2013-10-03 18:37:29 UTC
Permalink
Post by Christopher Siden
http://cr.illumos.org/~webrev/csiden/illumos-extensible/
Work by Matt Ahrens. These changes introduce a new extensible_dataset
feature flag. Enabling the flag has no user-visible effect at the
moment since it exists solely for other feature flags to depend on. We
are pushing it upstream without any consumers because Joyent is
working on a new feature flag that will use it. We have some internal
feature flags that use extensible_dataset that aren't ready to push
upstream yet, but we've used them to test that the extensible_dataset
feature flag works as expected.
A few style and portability comments. Note that C99 extensions are not
used in Linux kernel code.

197 -int
198 -zfeature_lookup_guid(const char *guid, zfeature_info_t **res)
199 -{
200 - for (int i = 0; i < SPA_FEATURES; i++) {
201 + for (spa_feature_t i = 0; i < SPA_FEATURES; i++) {

(portability) 'for' loop initial declarations are only allowed in C99 mode


641 return (ret);
642 +}
643 +
644 +
645 +void
646 +dsl_dataset_zapify(dsl_dataset_t *ds, dmu_tx_t *tx)

(style) extra newline


690 @@ -738,9 +735,10 @@
691 dmu_buf_will_dirty(ds->ds_dbuf, tx);
692 ds->ds_phys->ds_deadlist_obj = 0;
693
694 + objset_t *os;
695 VERIFY0(dmu_objset_from_ds(ds, &os));

(portability) C90 forbids mixed declarations and code


1222 + for (int i = 0; feature->fi_depends[i] != SPA_FEATURE_NONE; i++)
1223 + spa_feature_enable(spa, feature->fi_depends[i], tx);

(portability) 'for' loop initial declarations are only allowed in C99 mode


Thanks,
Ned
Matthew Ahrens
2013-10-04 21:04:21 UTC
Permalink
Ned, thanks for bringing up the C89 vs C99 issues. Given the preponderance
of C99 code already in ZFS (on illumos and FreeBSD), let's discuss this in
a separate thread, as this is a global issue rather than being specific to
this change. I'll post to ***@open-zfs.org later today.

--matt
Post by Ned Bass
Post by Christopher Siden
http://cr.illumos.org/~webrev/csiden/illumos-extensible/
Work by Matt Ahrens. These changes introduce a new extensible_dataset
feature flag. Enabling the flag has no user-visible effect at the
moment since it exists solely for other feature flags to depend on. We
are pushing it upstream without any consumers because Joyent is
working on a new feature flag that will use it. We have some internal
feature flags that use extensible_dataset that aren't ready to push
upstream yet, but we've used them to test that the extensible_dataset
feature flag works as expected.
A few style and portability comments. Note that C99 extensions are not
used in Linux kernel code.
197 -int
198 -zfeature_lookup_guid(const char *guid, zfeature_info_t **res)
199 -{
200 - for (int i = 0; i < SPA_FEATURES; i++) {
201 + for (spa_feature_t i = 0; i < SPA_FEATURES; i++) {
(portability) 'for' loop initial declarations are only allowed in C99 mode
641 return (ret);
642 +}
643 +
644 +
645 +void
646 +dsl_dataset_zapify(dsl_dataset_t *ds, dmu_tx_t *tx)
(style) extra newline
691 dmu_buf_will_dirty(ds->ds_dbuf, tx);
692 ds->ds_phys->ds_deadlist_obj = 0;
693
694 + objset_t *os;
695 VERIFY0(dmu_objset_from_ds(ds, &os));
(portability) C90 forbids mixed declarations and code
1222 + for (int i = 0; feature->fi_depends[i] != SPA_FEATURE_NONE; i++)
1223 + spa_feature_enable(spa, feature->fi_depends[i], tx);
(portability) 'for' loop initial declarations are only allowed in C99 mode
Thanks,
Ned
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/21635000-ebd1d460
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com

Loading...