I ran a check on a partition :
sudo e2fsck -c /dev/sdb3
It found some bad blocks. As far as I understood, it marked the badblocks, so that no files will use them.
My question is : is that "marking" persistent or is it linked to the partition ? More specifically, if I reformat the partition with something like
sudo mkfs.ext4 /dev/sdb3
are the badblocks still marked ?
That marking is part of the filesystem, and thus should be overwritten by the creation of a new filesystem. mke2fs can rerun the badblock check using -c, or you can plausibly extract the list with dumpe2fs -b and read it back in with -l for either mke2fs or e2fsck. Since the list uses block numbers, the block size must be kept the same.