Re: [PATCH blktests v5 1/3] bcache: add bcache/001

Daniel Wagner <[email protected]> Fri, 6 Mar 2026 13:45:14 +0100
Newsgroups org.kernel.vger.linux-bcache,org.kernel.vger.linux-block
Message-ID <[email protected]>
> > +	# add /dev prefix to device names
> > +	cdevs=( "${cdevs[@]/#/\/dev\/}" )
> > +	bdevs=( "${bdevs[@]/#/\/dev\/}" )
> 
> Here, /dev/ prefix is added to arguments of _bcache_wipe_devs() call below.
> 
> > +
> > +	# make-bcache expects empty/cleared devices
> > +	_bcache_wipe_devs "${cdevs[@]}" "${bdevs[@]}"
> 
> [...]
> 
> > +_remove_bcache() {
> > +	local -a cdevs=()
> > +	local -a bdevs=()
> > +	local -a csets=()
> > +	local -a bcache_devs=()
> > +	local uuid
> 
> [...]
> 
> > +	local timeout
> > +	for cset in "${csets[@]}"; do
> > +		timeout=0
> > +		while [[ -d /sys/fs/bcache/"${cset}" ]] && (( timeout < 10 )); do
> > +			sleep 0.5
> > +			(( timeout++ ))
> > +		done
> > +	done
> 
> However, /dev prefix is not added here for the _bcache_wipe_devs() call below. I
> added the hunk below, then observed the nvme?n1 files are no longer created in
> my environment.
> 
>        # add /dev prefix to device names
>        cdevs=( "${cdevs[@]/#/\/dev\/}" )
>        bdevs=( "${bdevs[@]/#/\/dev\/}" )
> 
> Other than this, this patch looks good to me. If you are okay with it, I can
> fold-in the change above when I apply this patch.

No objection from me, please go ahead!