On Sat, 19 Mar 2022 23:12:36 +0800 Coly Li <colyli@xxxxxxx> wrote: > Hi Kinga, > > > I am fine with the above idea, except the extra is_container(). IMHO > comparing directly with LEVEL_CONTAINER is fine, adding > is_container() doesn't help too much. > > Hi Coly, It is used in many places and is long. This is the main reason we changed that. As you can see, some ifs was simplified and readability is improved. Generally, if something is repeated two or more times, it should be gathered inside function. This simplifies future changes (for example if we decide to add other level check here). Also it simplifies code analysis (IDE will show us all usages) and it gives basic description. In this case it could be redundant but IMO it is a design we should follow. We already proposed similar inline for raid456 in other patch. Thanks, Mariusz