From: Linus Torvalds Date: Thu, 14 Jun 2018 22:31:07 +0000 (+0900) Subject: Merge tag 'vfs-timespec64' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7a932516f55cdf430c7cce78df2010ff7db6b874;p=linux.git Merge tag 'vfs-timespec64' of git://git./linux/kernel/git/arnd/playground Pull inode timestamps conversion to timespec64 from Arnd Bergmann: "This is a late set of changes from Deepa Dinamani doing an automated treewide conversion of the inode and iattr structures from 'timespec' to 'timespec64', to push the conversion from the VFS layer into the individual file systems. As Deepa writes: 'The series aims to switch vfs timestamps to use struct timespec64. Currently vfs uses struct timespec, which is not y2038 safe. The series involves the following: 1. Add vfs helper functions for supporting struct timepec64 timestamps. 2. Cast prints of vfs timestamps to avoid warnings after the switch. 3. Simplify code using vfs timestamps so that the actual replacement becomes easy. 4. Convert vfs timestamps to use struct timespec64 using a script. This is a flag day patch. Next steps: 1. Convert APIs that can handle timespec64, instead of converting timestamps at the boundaries. 2. Update internal data structures to avoid timestamp conversions' Thomas Gleixner adds: 'I think there is no point to drag that out for the next merge window. The whole thing needs to be done in one go for the core changes which means that you're going to play that catchup game forever. Let's get over with it towards the end of the merge window'" * tag 'vfs-timespec64' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground: pstore: Remove bogus format string definition vfs: change inode times to use struct timespec64 pstore: Convert internal records to timespec64 udf: Simplify calls to udf_disk_stamp_to_time fs: nfs: get rid of memcpys for inode times ceph: make inode time prints to be long long lustre: Use long long type to print inode time fs: add timespec64_truncate() --- 7a932516f55cdf430c7cce78df2010ff7db6b874 diff --cc fs/ceph/addr.c index afcc59ed70906,0133ea2b784a4..292b3d72d7250 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@@ -1935,7 -1936,8 +1937,7 @@@ static int __ceph_pool_perm_get(struct 0, false, true); err = ceph_osdc_start_request(&fsc->client->osdc, rd_req, false); - wr_req->r_mtime = ci->vfs_inode.i_mtime; + wr_req->r_mtime = timespec64_to_timespec(ci->vfs_inode.i_mtime); - wr_req->r_abort_on_full = true; err2 = ceph_osdc_start_request(&fsc->client->osdc, wr_req, false); if (!err) diff --cc fs/f2fs/namei.c index 64050c84d353c,4455d6c828085..231b7f3ea7d3f --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@@ -50,13 -50,10 +50,13 @@@ static struct inode *f2fs_new_inode(str inode->i_ino = ino; inode->i_blocks = 0; - inode->i_mtime = inode->i_atime = inode->i_ctime = - F2FS_I(inode)->i_crtime = current_time(inode); + inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); + F2FS_I(inode)->i_crtime = timespec64_to_timespec(inode->i_mtime); inode->i_generation = sbi->s_next_generation++; + if (S_ISDIR(inode->i_mode)) + F2FS_I(inode)->i_current_depth = 1; + err = insert_inode_locked(inode); if (err) { err = -EINVAL; diff --cc fs/overlayfs/overlayfs.h index 3c5e9f18b0d9f,9fe10247f9d47..7538b9b56237b --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@@ -325,16 -331,9 +325,16 @@@ int ovl_xattr_get(struct dentry *dentry ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size); struct posix_acl *ovl_get_acl(struct inode *inode, int type); int ovl_open_maybe_copy_up(struct dentry *dentry, unsigned int file_flags); - int ovl_update_time(struct inode *inode, struct timespec *ts, int flags); + int ovl_update_time(struct inode *inode, struct timespec64 *ts, int flags); bool ovl_is_private_xattr(const char *name); +struct ovl_inode_params { + struct inode *newinode; + struct dentry *upperdentry; + struct ovl_path *lowerpath; + struct dentry *index; + unsigned int numlower; +}; struct inode *ovl_new_inode(struct super_block *sb, umode_t mode, dev_t rdev); struct inode *ovl_lookup_inode(struct super_block *sb, struct dentry *real, bool is_upper); diff --cc fs/udf/super.c index fc77ea736da70,8449e5190530b..0c504c8031d36 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@@ -880,17 -885,17 +883,17 @@@ static int udf_load_pvoldesc(struct sup pvoldesc = (struct primaryVolDesc *)bh->b_data; - if (udf_disk_stamp_to_time(&UDF_SB(sb)->s_record_time, - pvoldesc->recordingDateAndTime)) { + udf_disk_stamp_to_time(&UDF_SB(sb)->s_record_time, + pvoldesc->recordingDateAndTime); #ifdef UDFFS_DEBUG - struct timestamp *ts = &pvoldesc->recordingDateAndTime; - udf_debug("recording time %04u/%02u/%02u %02u:%02u (%x)\n", - le16_to_cpu(ts->year), ts->month, ts->day, ts->hour, - ts->minute, le16_to_cpu(ts->typeAndTimezone)); + ts = &pvoldesc->recordingDateAndTime; + udf_debug("recording time %04u/%02u/%02u %02u:%02u (%x)\n", + le16_to_cpu(ts->year), ts->month, ts->day, ts->hour, + ts->minute, le16_to_cpu(ts->typeAndTimezone)); #endif - } + - ret = udf_dstrCS0toUTF8(outstr, 31, pvoldesc->volIdent, 32); + ret = udf_dstrCS0toChar(sb, outstr, 31, pvoldesc->volIdent, 32); if (ret < 0) goto out_bh;