* [PATCH] udf: use common error code for unclean filesystem
@ 2020-07-26 7:58 Pavel Machek
2020-07-27 12:12 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2020-07-26 7:58 UTC (permalink / raw)
To: jack, linux-kernel, trivial
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
Use common error code for unclean filesystem, and warn when
incosistency is detected.
Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index adaba8e8b326..8e74c7b5b8d0 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1395,7 +1395,10 @@ static int udf_read_inode(struct inode *inode, bool hidden_inode)
if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_SHORT &&
iinfo->i_alloc_type != ICBTAG_FLAG_AD_LONG &&
iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) {
- ret = -EIO;
+ ret = -EUCLEAN;
+ udf_err(inode->i_sb, "invalid allocation type: %u\n",
+ iinfo->i_alloc_type);
+
goto out;
}
iinfo->i_unique = 0;
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] udf: use common error code for unclean filesystem
2020-07-26 7:58 [PATCH] udf: use common error code for unclean filesystem Pavel Machek
@ 2020-07-27 12:12 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2020-07-27 12:12 UTC (permalink / raw)
To: Pavel Machek; +Cc: jack, linux-kernel, trivial
On Sun 26-07-20 09:58:28, Pavel Machek wrote:
>
> Use common error code for unclean filesystem, and warn when
> incosistency is detected.
>
> Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
So this is going in the right direction but there are *much* more places
that would need a similar treatment (furthermore I'd prefer to use the
EFSCORRUPTED redefine of EUCLEAN as other filesystems do). Any reason why
you converted this particular place?
Honza
>
> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index adaba8e8b326..8e74c7b5b8d0 100644
> --- a/fs/udf/inode.c
> +++ b/fs/udf/inode.c
> @@ -1395,7 +1395,10 @@ static int udf_read_inode(struct inode *inode, bool hidden_inode)
> if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_SHORT &&
> iinfo->i_alloc_type != ICBTAG_FLAG_AD_LONG &&
> iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) {
> - ret = -EIO;
> + ret = -EUCLEAN;
> + udf_err(inode->i_sb, "invalid allocation type: %u\n",
> + iinfo->i_alloc_type);
> +
> goto out;
> }
> iinfo->i_unique = 0;
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-27 12:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26 7:58 [PATCH] udf: use common error code for unclean filesystem Pavel Machek
2020-07-27 12:12 ` Jan Kara
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.