ext4: Reduce ext4 timestamp warnings
diff mbox series

Message ID 20190904150251.27004-1-deepa.kernel@gmail.com
State New
Headers show
Series
  • ext4: Reduce ext4 timestamp warnings
Related show

Commit Message

Deepa Dinamani Sept. 4, 2019, 3:02 p.m. UTC
When ext4 file systems were created intentionally with 128 byte inodes,
the rate-limited warning of eventual possible timestamp overflow are
still emitted rather frequently.  Remove the warning for now.

Discussion for whether any warning is needed,
and where it should be emitted, can be found at
https://lore.kernel.org/lkml/1567523922.5576.57.camel@lca.pw/.
I can post a separate follow-up patch after the conclusion.

Reported-by: Qian Cai <cai@lca.pw>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
---
 fs/ext4/ext4.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Andreas Dilger Sept. 4, 2019, 6:39 p.m. UTC | #1
On Sep 4, 2019, at 09:02, Deepa Dinamani <deepa.kernel@gmail.com> wrote:
> 
> When ext4 file systems were created intentionally with 128 byte inodes,
> the rate-limited warning of eventual possible timestamp overflow are
> still emitted rather frequently.  Remove the warning for now.
> 
> Discussion for whether any warning is needed,
> and where it should be emitted, can be found at
> https://lore.kernel.org/lkml/1567523922.5576.57.camel@lca.pw/.
> I can post a separate follow-up patch after the conclusion.
> 
> Reported-by: Qian Cai <cai@lca.pw>
> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>

I'd be in favor of a severely rare-limited warning in the actual case
that Y2038 timestamps cannot be stored, but the current message is
too verbose for now and I agree it is better to remove it while discussions
on the best solution are underway. 

Reviewed-by: Andreas Dilger <adilger@dilger.ca>

> ---
> fs/ext4/ext4.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 9e3ae3be3de9..24b14bd3feab 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -833,10 +833,8 @@ do {                                        \
>        (raw_inode)->xtime ## _extra =                    \
>                ext4_encode_extra_time(&(inode)->xtime);    \
>        }                                \
> -    else    {\
> +    else    \
>        (raw_inode)->xtime = cpu_to_le32(clamp_t(int32_t, (inode)->xtime.tv_sec, S32_MIN, S32_MAX));    \
> -        ext4_warning_inode(inode, "inode does not support timestamps beyond 2038"); \
> -    } \
> } while (0)
> 
> #define EXT4_EINODE_SET_XTIME(xtime, einode, raw_inode)                   \
> -- 
> 2.17.1
>
Arnd Bergmann Sept. 4, 2019, 8:56 p.m. UTC | #2
On Wed, Sep 4, 2019 at 8:39 PM Andreas Dilger <adilger@dilger.ca> wrote:
>
> On Sep 4, 2019, at 09:02, Deepa Dinamani <deepa.kernel@gmail.com> wrote:
> >
> > When ext4 file systems were created intentionally with 128 byte inodes,
> > the rate-limited warning of eventual possible timestamp overflow are
> > still emitted rather frequently.  Remove the warning for now.
> >
> > Discussion for whether any warning is needed,
> > and where it should be emitted, can be found at
> > https://lore.kernel.org/lkml/1567523922.5576.57.camel@lca.pw/.
> > I can post a separate follow-up patch after the conclusion.
> >
> > Reported-by: Qian Cai <cai@lca.pw>
> > Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
>
> I'd be in favor of a severely rare-limited warning in the actual case
> that Y2038 timestamps cannot be stored, but the current message is
> too verbose for now and I agree it is better to remove it while discussions
> on the best solution are underway.
>
> Reviewed-by: Andreas Dilger <adilger@dilger.ca>

Agreed completely.

Applied on top of the y2038 branch now, thanks a lot for the update!

This should be part of tomorrow's linux-next then.

       Arnd

Patch
diff mbox series

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 9e3ae3be3de9..24b14bd3feab 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -833,10 +833,8 @@  do {										\
 		(raw_inode)->xtime ## _extra =					\
 				ext4_encode_extra_time(&(inode)->xtime);	\
 		}								\
-	else	{\
+	else	\
 		(raw_inode)->xtime = cpu_to_le32(clamp_t(int32_t, (inode)->xtime.tv_sec, S32_MIN, S32_MAX));	\
-		ext4_warning_inode(inode, "inode does not support timestamps beyond 2038"); \
-	} \
 } while (0)
 
 #define EXT4_EINODE_SET_XTIME(xtime, einode, raw_inode)			       \