Commit e0797d3b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ext2 and isofs updates from Jan Kara:

 - isofs fix of handling of particularly formatted Rock Ridge timestamps

 - Add deprecation notice about support of DAX in ext2 filesystem driver

* tag 'fs_for_v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  ext2: Deprecate DAX
  isofs: fix Y2038 and Y2156 issues in Rock Ridge TF entry
parents db340159 d5a2693f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -601,7 +601,8 @@ static int ext2_parse_param(struct fs_context *fc, struct fs_parameter *param)
	case Opt_dax:
#ifdef CONFIG_FS_DAX
		ext2_msg_fc(fc, KERN_WARNING,
		    "DAX enabled. Warning: EXPERIMENTAL, use at your own risk");
		    "DAX enabled. Warning: DAX support in ext2 driver is deprecated"
		    " and will be removed at the end of 2025. Please use ext4 driver instead.");
		ctx_set_mount_opt(ctx, EXT2_MOUNT_DAX);
#else
		ext2_msg_fc(fc, KERN_INFO, "dax option not supported");
+5 −2
Original line number Diff line number Diff line
@@ -1275,6 +1275,7 @@ static int isofs_read_inode(struct inode *inode, int relocated)
	unsigned long offset;
	struct iso_inode_info *ei = ISOFS_I(inode);
	int ret = -EIO;
	struct timespec64 ts;

	block = ei->i_iget5_block;
	bh = sb_bread(inode->i_sb, block);
@@ -1387,8 +1388,10 @@ static int isofs_read_inode(struct inode *inode, int relocated)
			inode->i_ino, de->flags[-high_sierra]);
	}
#endif
	inode_set_mtime_to_ts(inode,
			      inode_set_atime_to_ts(inode, inode_set_ctime(inode, iso_date(de->date, high_sierra), 0)));
	ts = iso_date(de->date, high_sierra ? ISO_DATE_HIGH_SIERRA : 0);
	inode_set_ctime_to_ts(inode, ts);
	inode_set_atime_to_ts(inode, ts);
	inode_set_mtime_to_ts(inode, ts);

	ei->i_first_extent = (isonum_733(de->extent) +
			isonum_711(de->ext_attr_length));
+3 −1
Original line number Diff line number Diff line
@@ -106,7 +106,9 @@ static inline unsigned int isonum_733(u8 *p)
	/* Ignore bigendian datum due to broken mastering programs */
	return get_unaligned_le32(p);
}
extern int iso_date(u8 *, int);
#define ISO_DATE_HIGH_SIERRA (1 << 0)
#define ISO_DATE_LONG_FORM (1 << 1)
struct timespec64 iso_date(u8 *p, int flags);

struct inode;		/* To make gcc happy */

+23 −17
Original line number Diff line number Diff line
@@ -412,7 +412,12 @@ parse_rock_ridge_inode_internal(struct iso_directory_record *de,
				}
			}
			break;
		case SIG('T', 'F'):
		case SIG('T', 'F'): {
			int flags, size, slen;

			flags = rr->u.TF.flags & TF_LONG_FORM ? ISO_DATE_LONG_FORM : 0;
			size = rr->u.TF.flags & TF_LONG_FORM ? 17 : 7;
			slen = rr->len - 5;
			/*
			 * Some RRIP writers incorrectly place ctime in the
			 * TF_CREATE field. Try to handle this correctly for
@@ -420,27 +425,28 @@ parse_rock_ridge_inode_internal(struct iso_directory_record *de,
			 */
			/* Rock ridge never appears on a High Sierra disk */
			cnt = 0;
			if (rr->u.TF.flags & TF_CREATE) {
				inode_set_ctime(inode,
						iso_date(rr->u.TF.times[cnt++].time, 0),
						0);
			if ((rr->u.TF.flags & TF_CREATE) && size <= slen) {
				inode_set_ctime_to_ts(inode,
						iso_date(rr->u.TF.data + size * cnt++, flags));
				slen -= size;
			}
			if (rr->u.TF.flags & TF_MODIFY) {
				inode_set_mtime(inode,
						iso_date(rr->u.TF.times[cnt++].time, 0),
						0);
			if ((rr->u.TF.flags & TF_MODIFY) && size <= slen) {
				inode_set_mtime_to_ts(inode,
						iso_date(rr->u.TF.data + size * cnt++, flags));
				slen -= size;
			}
			if (rr->u.TF.flags & TF_ACCESS) {
				inode_set_atime(inode,
						iso_date(rr->u.TF.times[cnt++].time, 0),
						0);
			if ((rr->u.TF.flags & TF_ACCESS) && size <= slen) {
				inode_set_atime_to_ts(inode,
						iso_date(rr->u.TF.data + size * cnt++, flags));
				slen -= size;
			}
			if (rr->u.TF.flags & TF_ATTRIBUTES) {
				inode_set_ctime(inode,
						iso_date(rr->u.TF.times[cnt++].time, 0),
						0);
			if ((rr->u.TF.flags & TF_ATTRIBUTES) && size <= slen) {
				inode_set_ctime_to_ts(inode,
						iso_date(rr->u.TF.data + size * cnt++, flags));
				slen -= size;
			}
			break;
		}
		case SIG('S', 'L'):
			{
				int slen;
+1 −5
Original line number Diff line number Diff line
@@ -65,13 +65,9 @@ struct RR_PL_s {
	__u8 location[8];
};

struct stamp {
	__u8 time[7];		/* actually 6 unsigned, 1 signed */
} __attribute__ ((packed));

struct RR_TF_s {
	__u8 flags;
	struct stamp times[];	/* Variable number of these beasts */
	__u8 data[];
} __attribute__ ((packed));

/* Linux-specific extension for transparent decompression */
Loading