diff options
author | Ritesh Harjani <riteshh@linux.ibm.com> | 2020-05-10 08:24:52 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-06-04 05:16:52 +0200 |
commit | ec8c60be96d6de74be601fbca56342efb9a1e039 (patch) | |
tree | ca4a9d6177ee0f814d476e309e801cbb2eca6663 /fs/ext4/inode.c | |
parent | ext4: use BIT() macro for BH_** state bits (diff) | |
download | linux-ec8c60be96d6de74be601fbca56342efb9a1e039.tar.xz linux-ec8c60be96d6de74be601fbca56342efb9a1e039.zip |
ext4: improve ext_debug() msg in case of block allocation failure
ext4_map_blocks() has ext_debug msg early at the start of function.
We also get ext_debug msg if we could allocate a block from
ext4_ext_map_blocks(). But there is no ext_debug() msg in case of
block allocation failure. So add one along with error code.
Also add more info in ext_debug() msg like how many blocks were allocated
v/s how many were requested in ext4_ext_map_blocks().
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/1610ec2aa932396be00f9d552fe29da473ead176.1589086800.git.riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to '')
-rw-r--r-- | fs/ext4/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 043ee7efce5f..0a52f98512d7 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -732,6 +732,10 @@ out_sem: return ret; } } + + if (retval < 0) + ext_debug("failed for inode %lu with err %d\n", + inode->i_ino, retval); return retval; } |