Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1418079 > unrolled thread
| Started by | Deepa Dinamani <deepa.kernel@gmail.com> |
|---|---|
| First post | 2016-06-09 07:20 +0200 |
| Last post | 2016-06-10 03:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 06/21] fs: udf: Replace CURRENT_TIME with current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-09 07:20 +0200
Re: [PATCH 06/21] fs: udf: Replace CURRENT_TIME with current_fs_time() Jan Kara <jack@suse.cz> - 2016-06-09 09:50 +0200
Re: [PATCH 06/21] fs: udf: Replace CURRENT_TIME with current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-10 03:00 +0200
| From | Deepa Dinamani <deepa.kernel@gmail.com> |
|---|---|
| Date | 2016-06-09 07:20 +0200 |
| Subject | [PATCH 06/21] fs: udf: Replace CURRENT_TIME with current_fs_time() |
| Message-ID | <rI0xQ-1Vf-13@gated-at.bofh.it> |
CURRENT_TIME is not y2038 safe. CURRENT_TIME macro is also not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Logical Volume Integrity format is described to have the same timestamp format for "Recording Date and time" as the other [a,c,m]timestamps. Hence using current_fs_time() instead here promises to maintain the same granularity as other timestamps. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. As part of the effort current_fs_time() will be extended to do range checks. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Cc: Jan Kara <jack@suse.com> --- fs/udf/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/udf/super.c b/fs/udf/super.c index 4942549..482a610 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -1998,7 +1998,7 @@ static void udf_open_lvid(struct super_block *sb) lvidiu->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; lvidiu->impIdent.identSuffix[1] = UDF_OS_ID_LINUX; udf_time_to_disk_stamp(&lvid->recordingDateAndTime, - CURRENT_TIME); + current_fs_time(sb)); lvid->integrityType = cpu_to_le32(LVID_INTEGRITY_TYPE_OPEN); lvid->descTag.descCRC = cpu_to_le16( @@ -2030,7 +2030,7 @@ static void udf_close_lvid(struct super_block *sb) mutex_lock(&sbi->s_alloc_mutex); lvidiu->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; lvidiu->impIdent.identSuffix[1] = UDF_OS_ID_LINUX; - udf_time_to_disk_stamp(&lvid->recordingDateAndTime, CURRENT_TIME); + udf_time_to_disk_stamp(&lvid->recordingDateAndTime, current_fs_time(sb)); if (UDF_MAX_WRITE_VERSION > le16_to_cpu(lvidiu->maxUDFWriteRev)) lvidiu->maxUDFWriteRev = cpu_to_le16(UDF_MAX_WRITE_VERSION); if (sbi->s_udfrev > le16_to_cpu(lvidiu->minUDFReadRev)) -- 1.9.1
[toc] | [next] | [standalone]
| From | Jan Kara <jack@suse.cz> |
|---|---|
| Date | 2016-06-09 09:50 +0200 |
| Subject | Re: [PATCH 06/21] fs: udf: Replace CURRENT_TIME with current_fs_time() |
| Message-ID | <rI2SZ-3kN-31@gated-at.bofh.it> |
| In reply to | #1418079 |
On Wed 08-06-16 22:04:50, Deepa Dinamani wrote: > CURRENT_TIME is not y2038 safe. > > CURRENT_TIME macro is also not appropriate for filesystems > as it doesn't use the right granularity for filesystem > timestamps. > > Logical Volume Integrity format is described to have the > same timestamp format for "Recording Date and time" as > the other [a,c,m]timestamps. > Hence using current_fs_time() instead here promises to > maintain the same granularity as other timestamps. > > This is also in preparation for the patch that transitions > vfs timestamps to use 64 bit time and hence make them > y2038 safe. As part of the effort current_fs_time() will be > extended to do range checks. Just one nit below. > @@ -2030,7 +2030,7 @@ static void udf_close_lvid(struct super_block *sb) > mutex_lock(&sbi->s_alloc_mutex); > lvidiu->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; > lvidiu->impIdent.identSuffix[1] = UDF_OS_ID_LINUX; > - udf_time_to_disk_stamp(&lvid->recordingDateAndTime, CURRENT_TIME); > + udf_time_to_disk_stamp(&lvid->recordingDateAndTime, current_fs_time(sb)); > if (UDF_MAX_WRITE_VERSION > le16_to_cpu(lvidiu->maxUDFWriteRev)) > lvidiu->maxUDFWriteRev = cpu_to_le16(UDF_MAX_WRITE_VERSION); > if (sbi->s_udfrev > le16_to_cpu(lvidiu->minUDFReadRev)) Please wrap this line properly so that it does not exceed 80 characters. Other than that feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR
[toc] | [prev] | [next] | [standalone]
| From | Deepa Dinamani <deepa.kernel@gmail.com> |
|---|---|
| Date | 2016-06-10 03:00 +0200 |
| Message-ID | <rIiXM-5N6-7@gated-at.bofh.it> |
| In reply to | #1418142 |
On Thu, Jun 9, 2016 at 12:41 AM, Jan Kara <jack@suse.cz> wrote: > On Wed 08-06-16 22:04:50, Deepa Dinamani wrote: >> Logical Volume Integrity format is described to have the >> same timestamp format for "Recording Date and time" as >> the other [a,c,m]timestamps. >> Hence using current_fs_time() instead here promises to >> maintain the same granularity as other timestamps. >> > Just one nit below. > >> @@ -2030,7 +2030,7 @@ static void udf_close_lvid(struct super_block *sb) >> - udf_time_to_disk_stamp(&lvid->recordingDateAndTime, CURRENT_TIME); >> + udf_time_to_disk_stamp(&lvid->recordingDateAndTime, current_fs_time(sb)); > > Please wrap this line properly so that it does not exceed 80 characters. > Other than that feel free to add: > > Reviewed-by: Jan Kara <jack@suse.cz> Thanks, I will take care of this in v2 of the patch series. - Deepa
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web