Bankruptcy totally stops foreclosure - for a while, at least. That can give a seller more time to negotiate a short sale. At a minimum, the sale will be delayed 30 days in Chapter 7 bankruptcy and up to several years in Chapter 13 bankruptcy. Of course there are a number of important variables, and each situation is different.
Bankruptcy discharges any mortgage loan deficiency caused by the short sale. That means that if your house sells for $200,000.00, for example, and you owe $250.000.00 on the mortgage, you can discharge (eliminate) that $50,000.00 deficiency.
Judgment liens against the property can usually be removed by the bankruptcy court. There is no need to negotiate them off title.