Commit ce38507 Paul Dagnelie
committed
1 parent a6bb723 commit ce38507 Copy full SHA for ce38507
File tree 3 files changed +7
-10
lines changed
3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -352,8 +352,8 @@ extern ddt_phys_variant_t ddt_phys_select(const ddt_t *ddt,
352
352
const ddt_entry_t * dde , const blkptr_t * bp );
353
353
extern uint64_t ddt_phys_birth (const ddt_univ_phys_t * ddp ,
354
354
ddt_phys_variant_t v );
355
- extern int ddt_phys_gang_count (const ddt_univ_phys_t * ddp ,
356
- ddt_phys_variant_t v , boolean_t encrypted );
355
+ extern int ddt_phys_is_gang (const ddt_univ_phys_t * ddp ,
356
+ ddt_phys_variant_t v );
357
357
extern int ddt_phys_dva_count (const ddt_univ_phys_t * ddp , ddt_phys_variant_t v ,
358
358
boolean_t encrypted );
359
359
Original file line number Diff line number Diff line change @@ -815,17 +815,14 @@ ddt_phys_birth(const ddt_univ_phys_t *ddp, ddt_phys_variant_t v)
815
815
}
816
816
817
817
int
818
- ddt_phys_gang_count (const ddt_univ_phys_t * ddp , ddt_phys_variant_t v ,
819
- boolean_t encrypted )
818
+ ddt_phys_is_gang (const ddt_univ_phys_t * ddp , ddt_phys_variant_t v )
820
819
{
821
820
ASSERT3U (v , < , DDT_PHYS_NONE );
822
821
823
822
const dva_t * dvas = (v == DDT_PHYS_FLAT ) ?
824
823
ddp -> ddp_flat .ddp_dva : ddp -> ddp_trad [v ].ddp_dva ;
825
824
826
- return (DVA_GET_GANG (& dvas [0 ]) +
827
- DVA_GET_GANG (& dvas [1 ] +
828
- DVA_GET_GANG (& dvas [2 ]) * !encrypted ));
825
+ return (DVA_GET_GANG (& dvas [0 ]));
829
826
}
830
827
831
828
int
Original file line number Diff line number Diff line change @@ -3795,7 +3795,7 @@ zio_ddt_write(zio_t *zio)
3795
3795
*/
3796
3796
int have_dvas = ddt_phys_dva_count (ddp , v , BP_IS_ENCRYPTED (bp ));
3797
3797
IMPLY (have_dvas == 0 , ddt_phys_birth (ddp , v ) == 0 );
3798
- int gang_dvas = ddt_phys_gang_count (ddp , v , BP_IS_ENCRYPTED ( bp ) );
3798
+ boolean_t is_ganged = ddt_phys_is_gang (ddp , v );
3799
3799
3800
3800
/* Number of DVAs requested by the IO. */
3801
3801
uint8_t need_dvas = zp -> zp_copies ;
@@ -3943,7 +3943,7 @@ zio_ddt_write(zio_t *zio)
3943
3943
need_dvas -= parent_dvas ;
3944
3944
}
3945
3945
3946
- if (gang_dvas > 0 && have_dvas > 0 ) {
3946
+ if (is_ganged ) {
3947
3947
zp -> zp_dedup = B_FALSE ;
3948
3948
BP_SET_DEDUP (bp , B_FALSE );
3949
3949
zio -> io_pipeline = ZIO_WRITE_PIPELINE ;
@@ -3957,7 +3957,7 @@ zio_ddt_write(zio_t *zio)
3957
3957
* grow the DDT entry by to satisfy the request.
3958
3958
*/
3959
3959
zio_prop_t czp = * zp ;
3960
- if (gang_dvas == 0 && have_dvas > 0 ) {
3960
+ if (have_dvas > 0 ) {
3961
3961
czp .zp_copies = need_dvas ;
3962
3962
czp .zp_gang_copies = 0 ;
3963
3963
} else {
You can’t perform that action at this time.
0 commit comments