fs: Structure code

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>