use mask bit for dirty & lock states