> On Aug 31, 2017, at 4:36 PM, NeilBrown <neilb@xxxxxxxx> wrote: > > On Thu, Aug 31 2017, Song Liu wrote: > >> Summary: >> >> Handling super == NULL case in avail_size1() was removed a while >> back. However, it is still useful in the following stack: >> >> avail_size1() with st->sb == NULL >> array_try_spare() with st == NULL >> try_spare() with st == NULL >> Incremental() with st == NULL > > I assume you mean "st->sb == NULL" in each case here? What you have > written doesn't make sense. > I did mean st == NULL. In array_try_spare(), if st is NULL, st2 is allocated with match_metadata_desc(), and avail_size() is called with st2. >> >> This patch adds the handling of super == NULL back to avail_size1(). > > I doubt this is the best thing to do. > If we don't have st->sb, calling avail_size doesn't make any sense. > Maybe we should be calling validate_geometry. > This was the same logic that got removed a few years ago. So far it works for my use cases. And I think it makes (some) sense. Is validate_geometry() really better than this approach? Thanks, Song -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html