https://github.com/bitcoin/bitcoin/pull/12653
```
a1926362e -blocksdir: keep blockindex leveldb database in datadir
f38e4fdb0 QA: Add -blocksdir test
386a6b62a Allow to optional specify the directory for the blocks storage
```
Original PR was buggy though, hence:
```
bugfix PR12806 (MarcoFalke)
d71bedb95a qa: Fix function names in feature_blocksdir
bugfix PR13985 (Alexander Leishman)
241f8b5de4 Fix typo in feature_blocksdir.py log message
bugfix PR14409 (Hennadii Stepanov)
c3f1821ac7 Make blockdir always net specific
e4a0c3547e Improve blocksdir functional test.
bugfix PR15124 (Ben Woosley)
ba8c8b2227 Fail if either disk space check fails
```
Also consider these related ones:
* https://github.com/bitcoin/bitcoin/pull/14364 (clarify the bad help message for blocksdir; as of now unmerged)
* https://github.com/bitcoin/bitcoin/pull/14374 (qt info)