PMFS: Remove BUG() from pmfs_dirty_inode

This check may not be required. For now keep a ratelimited printk.

Signed-off-by: Vishal Verma <vishal.l.verma@linux.intel.com>
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
PMFS: Fix two bugs with last block calculation

This commit fixes two bugs in the calculation of last block number while
deleting/truncating files.

1) While deleting a file, we were not looking at the PMFS_EOFBLOCKS_FL
flag and checking the size for 0 to determine last_blocknr which caused
last_blocknr to be set to invalid value which in-turn caused crash.

2) When determining the last_blocknr based on file size, we were not
truncating last_blocknr according to the inode's tree height. Sparse
files may have large file sizes (and hence large last_blocknr) but their
tree height may be too small to accomodate such a large file size.

Signed-off-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
PMFS: Don't override root inode perms on mount

For some reason we were manually overriding the root inode permissions
to be drwxrwxrwt on each mount.  This commit takes that code out and
leaves the permissions as they were on unmount.

I also changed an error message that was erroneously saying we were
doing something to recover when the root inode wasn't marked as being a
directory.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Acked-by: Rob Gittins <rob.gittins@intel.com>