mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-06-25 18:48:00 +03:00
Increase meta-dnode redundancy in "some" mode
Loss of one indirect block of the meta dnode likely means loss of the whole dataset. It is worse than one file that the man page promises, and in my opinion is not much better than "none" mode. This change restores redundancy of the meta-dnode indirect blocks, while same time still corrects expectations in the man page. Reviewed-by: Akash B <akash-b@hpe.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #17339
This commit is contained in:
parent
086105f4c4
commit
d5616ad34a
@ -144,9 +144,9 @@ typedef enum dmu_object_byteswap {
|
|||||||
#define DMU_OT_IS_DDT(ot) \
|
#define DMU_OT_IS_DDT(ot) \
|
||||||
((ot) == DMU_OT_DDT_ZAP)
|
((ot) == DMU_OT_DDT_ZAP)
|
||||||
|
|
||||||
#define DMU_OT_IS_CRITICAL(ot) \
|
#define DMU_OT_IS_CRITICAL(ot, level) \
|
||||||
(DMU_OT_IS_METADATA(ot) && \
|
(DMU_OT_IS_METADATA(ot) && \
|
||||||
(ot) != DMU_OT_DNODE && \
|
((ot) != DMU_OT_DNODE || (level) > 0) && \
|
||||||
(ot) != DMU_OT_DIRECTORY_CONTENTS && \
|
(ot) != DMU_OT_DIRECTORY_CONTENTS && \
|
||||||
(ot) != DMU_OT_SA)
|
(ot) != DMU_OT_SA)
|
||||||
|
|
||||||
|
@ -1632,7 +1632,8 @@ When set to
|
|||||||
ZFS stores an extra copy of only critical metadata.
|
ZFS stores an extra copy of only critical metadata.
|
||||||
This can improve file create performance since less metadata
|
This can improve file create performance since less metadata
|
||||||
needs to be written.
|
needs to be written.
|
||||||
If a single on-disk block is corrupt, at worst a single user file can be lost.
|
If a single on-disk block is corrupt, multiple user files or directories
|
||||||
|
can be lost.
|
||||||
.Pp
|
.Pp
|
||||||
When set to
|
When set to
|
||||||
.Sy none ,
|
.Sy none ,
|
||||||
|
@ -2358,7 +2358,7 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp)
|
|||||||
gang_copies++;
|
gang_copies++;
|
||||||
break;
|
break;
|
||||||
case ZFS_REDUNDANT_METADATA_SOME:
|
case ZFS_REDUNDANT_METADATA_SOME:
|
||||||
if (DMU_OT_IS_CRITICAL(type)) {
|
if (DMU_OT_IS_CRITICAL(type, level)) {
|
||||||
copies++;
|
copies++;
|
||||||
gang_copies++;
|
gang_copies++;
|
||||||
} else if (DMU_OT_IS_METADATA(type)) {
|
} else if (DMU_OT_IS_METADATA(type)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user