Bankruptcy laws, like all laws, attempt to be fair (I admit not all laws actually are fair). In an effort to be fair to all creditors a bankruptcy debtor may not pay off one creditor in favor of another. In other words your relative cannot get all the money back you owe them and your credit card companies nothing.
Many times a bankruptcy debtor owes money to a relative and instead of listing the relative in the bankruptcy filing they pay off the loan before filing.
If this happens your case trustee or a creditor could bring a “Preference Action” against your relative in order to get back the money you paid them. This means that your relative will be sued in the bankruptcy Court and forced to repay the money.
Repaying Small loans will not likely result in a “preference action” against your relative. Also, after your bankruptcy case is over you are free to repay any creditor, including your relative.