All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: change the seconds fields in xfs_bulkstat to signed
@ 2019-10-14 17:12 Darrick J. Wong
  2019-10-14 19:03 ` Carlos Maiolino
  2019-10-15  8:02 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Darrick J. Wong @ 2019-10-14 17:12 UTC (permalink / raw)
  To: xfs; +Cc: Eric Sandeen

From: Darrick J. Wong <darrick.wong@oracle.com>

64-bit time is a signed quantity in the kernel, so the bulkstat
structure should reflect that.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/xfs/libxfs/xfs_fs.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h
index b0c884e80915..8b77eace70f1 100644
--- a/fs/xfs/libxfs/xfs_fs.h
+++ b/fs/xfs/libxfs/xfs_fs.h
@@ -368,11 +368,11 @@ struct xfs_bulkstat {
 	uint64_t	bs_blocks;	/* number of blocks		*/
 	uint64_t	bs_xflags;	/* extended flags		*/
 
-	uint64_t	bs_atime;	/* access time, seconds		*/
-	uint64_t	bs_mtime;	/* modify time, seconds		*/
+	int64_t		bs_atime;	/* access time, seconds		*/
+	int64_t		bs_mtime;	/* modify time, seconds		*/
 
-	uint64_t	bs_ctime;	/* inode change time, seconds	*/
-	uint64_t	bs_btime;	/* creation time, seconds	*/
+	int64_t		bs_ctime;	/* inode change time, seconds	*/
+	int64_t		bs_btime;	/* creation time, seconds	*/
 
 	uint32_t	bs_gen;		/* generation count		*/
 	uint32_t	bs_uid;		/* user id			*/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: change the seconds fields in xfs_bulkstat to signed
  2019-10-14 17:12 [PATCH] xfs: change the seconds fields in xfs_bulkstat to signed Darrick J. Wong
@ 2019-10-14 19:03 ` Carlos Maiolino
  2019-10-15  8:02 ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Carlos Maiolino @ 2019-10-14 19:03 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: xfs, Eric Sandeen

On Mon, Oct 14, 2019 at 10:12:11AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> 64-bit time is a signed quantity in the kernel, so the bulkstat
> structure should reflect that.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> ---
>  fs/xfs/libxfs/xfs_fs.h |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h
> index b0c884e80915..8b77eace70f1 100644
> --- a/fs/xfs/libxfs/xfs_fs.h
> +++ b/fs/xfs/libxfs/xfs_fs.h
> @@ -368,11 +368,11 @@ struct xfs_bulkstat {
>  	uint64_t	bs_blocks;	/* number of blocks		*/
>  	uint64_t	bs_xflags;	/* extended flags		*/
>  
> -	uint64_t	bs_atime;	/* access time, seconds		*/
> -	uint64_t	bs_mtime;	/* modify time, seconds		*/
> +	int64_t		bs_atime;	/* access time, seconds		*/
> +	int64_t		bs_mtime;	/* modify time, seconds		*/
>  
> -	uint64_t	bs_ctime;	/* inode change time, seconds	*/
> -	uint64_t	bs_btime;	/* creation time, seconds	*/
> +	int64_t		bs_ctime;	/* inode change time, seconds	*/
> +	int64_t		bs_btime;	/* creation time, seconds	*/
>  
>  	uint32_t	bs_gen;		/* generation count		*/
>  	uint32_t	bs_uid;		/* user id			*/

-- 
Carlos

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: change the seconds fields in xfs_bulkstat to signed
  2019-10-14 17:12 [PATCH] xfs: change the seconds fields in xfs_bulkstat to signed Darrick J. Wong
  2019-10-14 19:03 ` Carlos Maiolino
@ 2019-10-15  8:02 ` Christoph Hellwig
  2019-10-15 16:04   ` Darrick J. Wong
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2019-10-15  8:02 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: xfs, Eric Sandeen

On Mon, Oct 14, 2019 at 10:12:11AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> 64-bit time is a signed quantity in the kernel, so the bulkstat
> structure should reflect that.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Strictly speaking this is a break of the userspace API, but I can't see
how it causes problems in practice, so:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: change the seconds fields in xfs_bulkstat to signed
  2019-10-15  8:02 ` Christoph Hellwig
@ 2019-10-15 16:04   ` Darrick J. Wong
  0 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2019-10-15 16:04 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs, Eric Sandeen

On Tue, Oct 15, 2019 at 01:02:30AM -0700, Christoph Hellwig wrote:
> On Mon, Oct 14, 2019 at 10:12:11AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > 64-bit time is a signed quantity in the kernel, so the bulkstat
> > structure should reflect that.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Strictly speaking this is a break of the userspace API, but I can't see
> how it causes problems in practice, so:

Yeah, I think I'll add a note to the changelog:

"Note that the structure size stays the same and that we have not yet
published userspace headers for this new ioctl so there are no users to
break."

> Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-15 16:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 17:12 [PATCH] xfs: change the seconds fields in xfs_bulkstat to signed Darrick J. Wong
2019-10-14 19:03 ` Carlos Maiolino
2019-10-15  8:02 ` Christoph Hellwig
2019-10-15 16:04   ` Darrick J. Wong

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.