ZFS small fix in arc.c and zvol.c

Mickaël Maillot mickael.maillot at gmail.com
Tue Dec 29 23:55:42 UTC 2009


2009/12/29 Xin LI <delphij at gmail.com>:
> Hi,
>
> I think we'd better to bring our base code to be more current rather
> than picking up individual revisions, diverging further is probably
> not a good idea if we see long term cooperation with OpenSolaris as a
> goal...
>
> On Tue, Dec 29, 2009 at 12:46 PM, Mickaël Maillot
> <mickael.maillot at gmail.com> wrote:
>> Hi,
>>
>> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
>> in arc.c, a mutex is not properly detroyed:
>>
>> --- arc.c.orig  2009-12-29 21:15:31.192819155 +0100
>> +++ arc.c       2009-12-29 21:16:58.034271766 +0100
>> @@ -3626,6 +3626,7 @@
>>        mutex_destroy(&arc_mru_ghost->arcs_mtx);
>>        mutex_destroy(&arc_mfu->arcs_mtx);
>>        mutex_destroy(&arc_mfu_ghost->arcs_mtx);
>> +       mutex_destroy(&arc_l2c_only->arcs_mtx);
>>
>>        mutex_destroy(&zfs_write_limit_lock);
>
> Looks like a part of OpenSolaris onnv revision 8214?  Are you having
> some specific issue without this patch?
>

i don't have any problem, it's just look like a miss.
only this line is missing.
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6747934
http://hg.intevation.org/mirrors/opensolaris.org/onnv-gate/rev/d7abf7c1f1c1


>> i dont know if it's ok but in zvol.c
>> opensolaris call zvol_size_changed
>> just after zil_replay in zvol_create_minor function
>>
>> --- zvol.c.orig 2009-12-29 21:31:42.111529028 +0100
>> +++ zvol.c      2009-12-29 21:32:32.347413297 +0100
>> @@ -837,6 +837,7 @@
>>        zv->zv_volblocksize = doi.doi_data_block_size;
>>
>>        zil_replay(os, zv, &zv->zv_txg_assign, zvol_replay_vector, NULL);
>> +       zvol_size_changed(zv, maj);
>>
>>        /* XXX this should handle the possible i/o error */
>>        VERIFY(dsl_prop_register(dmu_objset_ds(zv->zv_objset),
>
> It seems that the OpenSolaris code has changed a lot and I didn't find
> similar change in OpenSolaris (yet).  Do you have a specific revision
> number or a tag?
>
> Cheers,
> --
> Xin LI <delphij at delphij.net> http://www.delphij.net
>

i just compare with zvol.c at nov 2008,
this line was recently removed with:
http://cvs.opensolaris.org/source/diff/onnv/onnv-gate/usr/src/uts/common/fs/zfs/zvol.c?r2=%252Fonnv%252Fonnv-gate%252Fusr%252Fsrc%252Futs%252Fcommon%252Ffs%252Fzfs%252Fzvol.c%4010588%3Adc03f981ea18&r1=%252Fonnv%252Fonnv-gate%252Fusr%252Fsrc%252Futs%252Fcommon%252Ffs%252Fzfs%252Fzvol.c%4010310%3Aba87b3315737

but with comment on r196927 from pjd, may be it's ok to add
zvol_size_changed or totally useless.


More information about the freebsd-fs mailing list