mds: allow choosing action for wirte error

Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: don't blindly create empty object when dirfrag is missing

mark the corresponding CDir as bad instead.

Signed-off-by: Yan, Zheng <zyan@redhat.com>