All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] allow enabling reflinks at runtime
@ 2016-06-02 14:19 Christoph Hellwig
  2016-06-02 14:19 ` [PATCH 1/3] xfs: add xfs_mp_hasreflink Christoph Hellwig
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Christoph Hellwig @ 2016-06-02 14:19 UTC (permalink / raw)
  To: darrick.wong; +Cc: xfs

I've had some vocal user requests to allow enabling reflinks at run time,
which happens to be a mostly trivial feature.  The only caveat is that we
need a large enough log size to support the reflink requirements, but for
typical large file systems that's not an issue.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* [PATCH 1/3] xfs: add xfs_mp_hasreflink
  2016-06-02 14:19 [RFC] allow enabling reflinks at runtime Christoph Hellwig
@ 2016-06-02 14:19 ` Christoph Hellwig
  2016-06-02 14:19 ` [PATCH 2/3] xfs: refactor xfs_refcountbt_alloc_block Christoph Hellwig
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 21+ messages in thread
From: Christoph Hellwig @ 2016-06-02 14:19 UTC (permalink / raw)
  To: darrick.wong; +Cc: xfs

Add a per-mount check for reflink capability.  We'll add a mount flag
to enable reflink post-mkfs soon and it'll need this to hook in.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_alloc.c          |  4 ++--
 fs/xfs/libxfs/xfs_bmap.c           |  4 ++--
 fs/xfs/libxfs/xfs_bmap_btree.c     |  2 +-
 fs/xfs/libxfs/xfs_format.h         |  2 +-
 fs/xfs/libxfs/xfs_refcount_btree.c |  4 ++--
 fs/xfs/libxfs/xfs_rmap.c           |  6 +++---
 fs/xfs/libxfs/xfs_rmap_btree.c     |  4 ++--
 fs/xfs/libxfs/xfs_trans_resv.c     |  8 ++++----
 fs/xfs/xfs_aops.c                  |  2 +-
 fs/xfs/xfs_fsops.c                 | 10 +++++-----
 fs/xfs/xfs_ioctl.c                 |  3 +--
 fs/xfs/xfs_mount.h                 |  5 +++++
 fs/xfs/xfs_reflink.c               |  6 +++---
 fs/xfs/xfs_super.c                 |  4 ++--
 14 files changed, 34 insertions(+), 30 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index e6e32c2..b3cfa34 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -68,7 +68,7 @@ xfs_extlen_t
 xfs_prealloc_blocks(
 	struct xfs_mount	*mp)
 {
-	if (xfs_sb_version_hasreflink(&mp->m_sb))
+	if (xfs_mp_hasreflink(mp))
 		return xfs_refc_block(mp) + 1;
 	if (xfs_sb_version_hasrmapbt(&mp->m_sb))
 		return XFS_RMAP_BLOCK(mp) + 1;
@@ -2466,7 +2466,7 @@ xfs_agf_verify(
 	    be32_to_cpu(agf->agf_btreeblks) > be32_to_cpu(agf->agf_length))
 		return false;
 
-	if (xfs_sb_version_hasreflink(&mp->m_sb) &&
+	if (xfs_mp_hasreflink(mp) &&
 	    be32_to_cpu(agf->agf_refcount_level) > XFS_BTREE_MAXLEVELS)
 		return false;
 
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 7e51f5c..effa8cc 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -810,7 +810,7 @@ try_another_ag:
 	 * has a block reservation.  That isn't the case here, so if we run out
 	 * of space we'll try again with another AG.
 	 */
-	if (xfs_sb_version_hasreflink(&cur->bc_mp->m_sb) &&
+	if (xfs_mp_hasreflink(cur->bc_mp) &&
 	    args.fsbno == NULLFSBLOCK &&
 	    args.type == XFS_ALLOCTYPE_NEAR_BNO) {
 		flist->xbf_low = 1;
@@ -972,7 +972,7 @@ try_another_ag:
 	 * has a block reservation.  That isn't the case here, so if we run out
 	 * of space we'll try again with another AG.
 	 */
-	if (xfs_sb_version_hasreflink(&ip->i_mount->m_sb) &&
+	if (xfs_mp_hasreflink(ip->i_mount) &&
 	    args.fsbno == NULLFSBLOCK &&
 	    args.type == XFS_ALLOCTYPE_NEAR_BNO) {
 		goto try_another_ag;
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c
index b742bd8..d07718d 100644
--- a/fs/xfs/libxfs/xfs_bmap_btree.c
+++ b/fs/xfs/libxfs/xfs_bmap_btree.c
@@ -489,7 +489,7 @@ try_another_ag:
 	 * has a block reservation.  That isn't the case here, so if we run out
 	 * of space we'll try again with another AG.
 	 */
-	if (xfs_sb_version_hasreflink(&cur->bc_mp->m_sb) &&
+	if (xfs_mp_hasreflink(cur->bc_mp) &&
 	    args.fsbno == NULLFSBLOCK &&
 	    args.type == XFS_ALLOCTYPE_NEAR_BNO) {
 		cur->bc_private.b.flist->xbf_low = 1;
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index 5cc0b8c..dcfc1ee 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -550,7 +550,7 @@ static inline bool xfs_sb_version_hasrmapbt(struct xfs_sb *sbp)
 
 static inline bool xfs_sb_version_hasreflink(struct xfs_sb *sbp)
 {
-	return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) &&
+	return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 &&
 		(sbp->sb_features_ro_compat & XFS_SB_FEAT_RO_COMPAT_REFLINK);
 }
 
diff --git a/fs/xfs/libxfs/xfs_refcount_btree.c b/fs/xfs/libxfs/xfs_refcount_btree.c
index 303f959..f83cb4b 100644
--- a/fs/xfs/libxfs/xfs_refcount_btree.c
+++ b/fs/xfs/libxfs/xfs_refcount_btree.c
@@ -218,7 +218,7 @@ xfs_refcountbt_verify(
 	if (block->bb_magic != cpu_to_be32(XFS_REFC_CRC_MAGIC))
 		return false;
 
-	if (!xfs_sb_version_hasreflink(&mp->m_sb))
+	if (!xfs_mp_hasreflink(mp))
 		return false;
 	if (!xfs_btree_sblock_v5hdr_verify(bp))
 		return false;
@@ -463,7 +463,7 @@ xfs_refcountbt_calc_reserves(
 	xfs_extlen_t		tree_len = 0;
 	int			error;
 
-	if (!xfs_sb_version_hasreflink(&mp->m_sb))
+	if (!xfs_mp_hasreflink(mp))
 		return 0;
 
 	*ask += xfs_refcountbt_max_size(mp);
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index d2bf531..e1ff7d7 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -874,7 +874,7 @@ xfs_rmap_unmap(
 	 * Only data fork extents on a reflink filesystem can overlap.
 	 * Everything else can use the regular free function.
 	 */
-	if (!xfs_sb_version_hasreflink(&mp->m_sb) ||
+	if (!xfs_mp_hasreflink(mp) ||
 	    XFS_RMAP_NON_INODE_OWNER(owner) ||
 	    (flags & XFS_RMAP_BMBT_BLOCK) ||
 	    (flags & XFS_RMAP_ATTR_FORK))
@@ -1047,7 +1047,7 @@ xfs_rmap_map(
 	 * Only data fork extents on a reflink filesystem can overlap.
 	 * Everything else can use the regular alloc function.
 	 */
-	if (!xfs_sb_version_hasreflink(&mp->m_sb) ||
+	if (!xfs_mp_hasreflink(mp) ||
 	    XFS_RMAP_NON_INODE_OWNER(owner) ||
 	    (flags & XFS_RMAP_BMBT_BLOCK) ||
 	    (flags & XFS_RMAP_ATTR_FORK))
@@ -1646,7 +1646,7 @@ xfs_rmap_convert(
 	 * Only data fork extents on a reflink filesystem can overlap.
 	 * Everything else can use the regular convert function.
 	 */
-	if (!xfs_sb_version_hasreflink(&mp->m_sb))
+	if (!xfs_mp_hasreflink(mp))
 		return __xfs_rmap_convert(cur, bno, len, unwritten, oinfo);
 	oldext = unwritten ? XFS_RMAP_UNWRITTEN : 0;
 	new_endoff = offset + len;
diff --git a/fs/xfs/libxfs/xfs_rmap_btree.c b/fs/xfs/libxfs/xfs_rmap_btree.c
index 3d6f12f..8969722 100644
--- a/fs/xfs/libxfs/xfs_rmap_btree.c
+++ b/fs/xfs/libxfs/xfs_rmap_btree.c
@@ -65,7 +65,7 @@ xfs_rmapbt_need_reserve(
 	struct xfs_mount	*mp)
 {
 	return  xfs_sb_version_hasrmapbt(&mp->m_sb) &&
-		xfs_sb_version_hasreflink(&mp->m_sb);
+		xfs_mp_hasreflink(mp);
 }
 
 static struct xfs_btree_cur *
@@ -479,7 +479,7 @@ void
 xfs_rmapbt_compute_maxlevels(
 	struct xfs_mount		*mp)
 {
-	if (xfs_sb_version_hasreflink(&mp->m_sb))
+	if (xfs_mp_hasreflink(mp))
 		mp->m_rmap_maxlevels = XFS_BTREE_MAXLEVELS;
 	else
 		mp->m_rmap_maxlevels = xfs_btree_compute_maxlevels(mp,
diff --git a/fs/xfs/libxfs/xfs_trans_resv.c b/fs/xfs/libxfs/xfs_trans_resv.c
index c88395b..d53fe89 100644
--- a/fs/xfs/libxfs/xfs_trans_resv.c
+++ b/fs/xfs/libxfs/xfs_trans_resv.c
@@ -84,7 +84,7 @@ xfs_allocfree_log_count(
 	blocks = num_ops * 2 * (2 * mp->m_ag_maxlevels - 1);
 	if (xfs_sb_version_hasrmapbt(&mp->m_sb))
 		blocks += num_ops * (2 * mp->m_rmap_maxlevels - 1);
-	if (xfs_sb_version_hasreflink(&mp->m_sb))
+	if (xfs_mp_hasreflink(mp))
 		blocks += 2 * num_ops * (2 * mp->m_refc_maxlevels - 1);
 
 	return blocks;
@@ -812,14 +812,14 @@ xfs_trans_resv_calc(
 	 * require a permanent reservation on space.
 	 */
 	resp->tr_write.tr_logres = xfs_calc_write_reservation(mp);
-	if (xfs_sb_version_hasreflink(&mp->m_sb))
+	if (xfs_mp_hasreflink(mp))
 		resp->tr_write.tr_logcount = XFS_WRITE_LOG_COUNT_REFLINK;
 	else
 		resp->tr_write.tr_logcount = XFS_WRITE_LOG_COUNT;
 	resp->tr_write.tr_logflags |= XFS_TRANS_PERM_LOG_RES;
 
 	resp->tr_itruncate.tr_logres = xfs_calc_itruncate_reservation(mp);
-	if (xfs_sb_version_hasreflink(&mp->m_sb))
+	if (xfs_mp_hasreflink(mp))
 		resp->tr_itruncate.tr_logcount = XFS_ITRUNCATE_LOG_COUNT_REFLINK;
 	else
 		resp->tr_itruncate.tr_logcount = XFS_ITRUNCATE_LOG_COUNT;
@@ -879,7 +879,7 @@ xfs_trans_resv_calc(
 	resp->tr_growrtalloc.tr_logflags |= XFS_TRANS_PERM_LOG_RES;
 
 	resp->tr_qm_dqalloc.tr_logres = xfs_calc_qm_dqalloc_reservation(mp);
-	if (xfs_sb_version_hasreflink(&mp->m_sb))
+	if (xfs_mp_hasreflink(mp))
 		resp->tr_qm_dqalloc.tr_logcount = XFS_WRITE_LOG_COUNT_REFLINK;
 	else
 		resp->tr_qm_dqalloc.tr_logcount = XFS_WRITE_LOG_COUNT;
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index d053a9e..a030f3e 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -698,7 +698,7 @@ xfs_is_cow_io(
 {
 	bool			is_cow;
 
-	if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb))
+	if (!xfs_mp_hasreflink(ip->i_mount))
 		return false;
 
 	xfs_ilock(ip, XFS_ILOCK_SHARED);
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 5b908dc..c2c939e 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -111,7 +111,7 @@ xfs_fs_geometry(
 				XFS_FSOP_GEOM_FLAGS_SPINODES : 0) |
 			(xfs_sb_version_hasrmapbt(&mp->m_sb) ?
 				XFS_FSOP_GEOM_FLAGS_RMAPBT : 0) |
-			(xfs_sb_version_hasreflink(&mp->m_sb) ?
+			(xfs_mp_hasreflink(mp) ?
 				XFS_FSOP_GEOM_FLAGS_REFLINK : 0);
 		geo->logsectsize = xfs_sb_version_hassector(&mp->m_sb) ?
 				mp->m_sb.sb_logsectsize : BBSIZE;
@@ -266,7 +266,7 @@ xfs_growfs_data_private(
 		agf->agf_longest = cpu_to_be32(tmpsize);
 		if (xfs_sb_version_hascrc(&mp->m_sb))
 			uuid_copy(&agf->agf_uuid, &mp->m_sb.sb_meta_uuid);
-		if (xfs_sb_version_hasreflink(&mp->m_sb)) {
+		if (xfs_mp_hasreflink(mp)) {
 			agf->agf_refcount_root = cpu_to_be32(
 					xfs_refc_block(mp));
 			agf->agf_refcount_level = cpu_to_be32(1);
@@ -463,7 +463,7 @@ xfs_growfs_data_private(
 			be16_add_cpu(&block->bb_numrecs, 1);
 
 			/* account for refc btree root */
-			if (xfs_sb_version_hasreflink(&mp->m_sb)) {
+			if (xfs_mp_hasreflink(mp)) {
 				rrec = XFS_RMAP_REC_ADDR(block, 5);
 				rrec->rm_startblock = cpu_to_be32(
 						xfs_refc_block(mp));
@@ -533,7 +533,7 @@ xfs_growfs_data_private(
 		/*
 		 * refcount btree root block
 		 */
-		if (xfs_sb_version_hasreflink(&mp->m_sb)) {
+		if (xfs_mp_hasreflink(mp)) {
 			bp = xfs_growfs_get_hdr_buf(mp,
 				XFS_AGB_TO_DADDR(mp, agno, xfs_refc_block(mp)),
 				BTOBB(mp->m_sb.sb_blocksize), 0,
@@ -1075,7 +1075,7 @@ xfs_getfsmap_is_shared(
 	xfs_extlen_t		flen;
 	int			error;
 
-	if (!xfs_sb_version_hasreflink(&cur->bc_mp->m_sb))
+	if (!xfs_mp_hasreflink(cur->bc_mp))
 		return false;
 
 	/* Are there any shared blocks here? */
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 4668ae6..cfc05ce 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1267,8 +1267,7 @@ xfs_ioctl_setattr_check_cowextsize(
 	if (!(fa->fsx_xflags & FS_XFLAG_COWEXTSIZE))
 		return 0;
 
-	if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb) ||
-	    ip->i_d.di_version != 3)
+	if (!xfs_mp_hasreflink(mp) || ip->i_d.di_version != 3)
 		return -EINVAL;
 
 	if (!S_ISREG(VFS_I(ip)->i_mode) && !S_ISDIR(VFS_I(ip)->i_mode))
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index d06b192..c2e1294 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -227,6 +227,11 @@ typedef struct xfs_mount {
 #define	XFS_WSYNC_READIO_LOG	15	/* 32k */
 #define	XFS_WSYNC_WRITEIO_LOG	14	/* 16k */
 
+static inline bool xfs_mp_hasreflink(struct xfs_mount *mp)
+{
+	return xfs_sb_version_hasreflink(&mp->m_sb);
+}
+
 /*
  * Allow large block sizes to be reported to userspace programs if the
  * "largeio" mount option is used.
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index 1e17d2e..e2664ea 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -852,7 +852,7 @@ xfs_reflink_recover_cow(
 	xfs_agnumber_t		agno;
 	int			error = 0;
 
-	if (!xfs_sb_version_hasreflink(&mp->m_sb))
+	if (!xfs_mp_hasreflink(mp))
 		return 0;
 
 	for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) {
@@ -1416,7 +1416,7 @@ xfs_reflink_remap_range(
 	xfs_extlen_t		cowextsize;
 	bool			is_same;
 
-	if (!xfs_sb_version_hasreflink(&mp->m_sb))
+	if (!xfs_mp_hasreflink(mp))
 		return -EOPNOTSUPP;
 
 	if (XFS_FORCED_SHUTDOWN(mp))
@@ -1880,7 +1880,7 @@ xfs_reflink_check_flag_adjust(
 
 	if (!chg)
 		return 0;
-	if (!xfs_sb_version_hasreflink(&ip->i_mount->m_sb))
+	if (!xfs_mp_hasreflink(ip->i_mount))
 		return -EOPNOTSUPP;
 	if (i_size_read(VFS_I(ip)) != 0)
 		return -EINVAL;
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 58068fc..84348af 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1589,7 +1589,7 @@ xfs_fs_fill_super(
 		"Block device does not support DAX Turning DAX off.");
 			mp->m_flags &= ~XFS_MOUNT_DAX;
 		}
-		if (xfs_sb_version_hasreflink(&mp->m_sb))
+		if (xfs_mp_hasreflink(mp))
 			xfs_alert(mp,
 		"DAX and reflink have not been tested together!");
 	}
@@ -1602,7 +1602,7 @@ xfs_fs_fill_super(
 		xfs_alert(mp,
 	"EXPERIMENTAL reverse mapping btree feature enabled. Use at your own risk!");
 
-	if (xfs_sb_version_hasreflink(&mp->m_sb))
+	if (xfs_mp_hasreflink(mp))
 		xfs_alert(mp,
 	"EXPERIMENTAL reflink feature enabled. Use at your own risk!");
 
-- 
2.1.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* [PATCH 2/3] xfs: refactor xfs_refcountbt_alloc_block
  2016-06-02 14:19 [RFC] allow enabling reflinks at runtime Christoph Hellwig
  2016-06-02 14:19 ` [PATCH 1/3] xfs: add xfs_mp_hasreflink Christoph Hellwig
@ 2016-06-02 14:19 ` Christoph Hellwig
  2016-06-02 14:19 ` [PATCH 3/3] xfs: add an option to enable reflinks at mount time Christoph Hellwig
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 21+ messages in thread
From: Christoph Hellwig @ 2016-06-02 14:19 UTC (permalink / raw)
  To: darrick.wong; +Cc: xfs

Split out a low level helper that we can use for enabling the reflink
btree at mount time.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_refcount_btree.c | 54 +++++++++++++++++++++++---------------
 1 file changed, 33 insertions(+), 21 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_refcount_btree.c b/fs/xfs/libxfs/xfs_refcount_btree.c
index f83cb4b..7ae3ad7 100644
--- a/fs/xfs/libxfs/xfs_refcount_btree.c
+++ b/fs/xfs/libxfs/xfs_refcount_btree.c
@@ -66,49 +66,61 @@ xfs_refcountbt_set_root(
 }
 
 STATIC int
-xfs_refcountbt_alloc_block(
-	struct xfs_btree_cur	*cur,
-	union xfs_btree_ptr	*start,
-	union xfs_btree_ptr	*new,
+__xfs_refcountbt_alloc_block(
+	struct xfs_trans	*tp,
+	xfs_agnumber_t		agno,
+	enum xfs_ag_resv_type	resv,
+	__be32			*agbno,
 	int			*stat)
 {
+	struct xfs_mount	*mp = tp->t_mountp;
 	struct xfs_alloc_arg	args;		/* block allocation args */
 	int			error;		/* error return value */
 
-	XFS_BTREE_TRACE_CURSOR(cur, XBT_ENTRY);
-
 	memset(&args, 0, sizeof(args));
-	args.tp = cur->bc_tp;
-	args.mp = cur->bc_mp;
+	args.tp = tp;
+	args.mp = mp;
 	args.type = XFS_ALLOCTYPE_NEAR_BNO;
-	args.fsbno = XFS_AGB_TO_FSB(cur->bc_mp, cur->bc_private.a.agno,
-			xfs_refc_block(args.mp));
+	args.fsbno = XFS_AGB_TO_FSB(mp, agno, xfs_refc_block(mp));
 	args.firstblock = args.fsbno;
 	xfs_rmap_ag_owner(&args.oinfo, XFS_RMAP_OWN_REFC);
 	args.minlen = args.maxlen = args.prod = 1;
-	args.resv = XFS_AG_RESV_METADATA;
+	args.resv = resv;
 
 	error = xfs_alloc_vextent(&args);
 	if (error)
-		goto out_error;
-	trace_xfs_refcountbt_alloc_block(cur->bc_mp, cur->bc_private.a.agno,
-			args.agbno, 1);
+		return error;
+	trace_xfs_refcountbt_alloc_block(mp, agno, args.agbno, 1);
 	if (args.fsbno == NULLFSBLOCK) {
-		XFS_BTREE_TRACE_CURSOR(cur, XBT_EXIT);
 		*stat = 0;
 		return 0;
 	}
-	ASSERT(args.agno == cur->bc_private.a.agno);
+	ASSERT(args.agno == agno);
 	ASSERT(args.len == 1);
 
-	new->s = cpu_to_be32(args.agbno);
-
-	XFS_BTREE_TRACE_CURSOR(cur, XBT_EXIT);
+	*agbno = cpu_to_be32(args.agbno);
 	*stat = 1;
 	return 0;
+}
+
+STATIC int
+xfs_refcountbt_alloc_block(
+	struct xfs_btree_cur	*cur,
+	union xfs_btree_ptr	*start,
+	union xfs_btree_ptr	*new,
+	int			*stat)
+{
+	int			error;
+
+	XFS_BTREE_TRACE_CURSOR(cur, XBT_ENTRY);
+
+	error = __xfs_refcountbt_alloc_block(cur->bc_tp, cur->bc_private.a.agno,
+			XFS_AG_RESV_METADATA, &new->s, stat);
+	if (error)
+		XFS_BTREE_TRACE_CURSOR(cur, XBT_ERROR);
+	else
+		XFS_BTREE_TRACE_CURSOR(cur, XBT_EXIT);
 
-out_error:
-	XFS_BTREE_TRACE_CURSOR(cur, XBT_ERROR);
 	return error;
 }
 
-- 
2.1.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* [PATCH 3/3] xfs: add an option to enable reflinks at mount time
  2016-06-02 14:19 [RFC] allow enabling reflinks at runtime Christoph Hellwig
  2016-06-02 14:19 ` [PATCH 1/3] xfs: add xfs_mp_hasreflink Christoph Hellwig
  2016-06-02 14:19 ` [PATCH 2/3] xfs: refactor xfs_refcountbt_alloc_block Christoph Hellwig
@ 2016-06-02 14:19 ` Christoph Hellwig
  2016-06-06 11:23   ` Carlos Maiolino
  2016-06-02 22:54 ` [RFC] allow enabling reflinks at runtime Dave Chinner
  2016-10-26 20:49 ` Darrick J. Wong
  4 siblings, 1 reply; 21+ messages in thread
From: Christoph Hellwig @ 2016-06-02 14:19 UTC (permalink / raw)
  To: darrick.wong; +Cc: xfs

If the reflink mount option is specified we'll add the reflink btree root
block to each AG late in the mount process and can then use the reflink
tree.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_refcount_btree.c | 83 ++++++++++++++++++++++++++++++++++++++
 fs/xfs/libxfs/xfs_refcount_btree.h |  2 +
 fs/xfs/libxfs/xfs_trans_resv.c     | 23 +++++++++++
 fs/xfs/libxfs/xfs_trans_resv.h     |  1 +
 fs/xfs/xfs_mount.c                 | 24 +++++++++--
 fs/xfs/xfs_mount.h                 |  5 ++-
 fs/xfs/xfs_super.c                 |  7 +++-
 7 files changed, 139 insertions(+), 6 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_refcount_btree.c b/fs/xfs/libxfs/xfs_refcount_btree.c
index 7ae3ad7..aaea8da 100644
--- a/fs/xfs/libxfs/xfs_refcount_btree.c
+++ b/fs/xfs/libxfs/xfs_refcount_btree.c
@@ -484,3 +484,86 @@ xfs_refcountbt_calc_reserves(
 
 	return error;
 }
+
+static int
+xfs_reflink_ag_add(
+	struct xfs_trans	*tp,
+	xfs_agnumber_t		agno)
+{
+	struct xfs_mount	*mp = tp->t_mountp;
+	struct xfs_perag	*pag;
+	struct xfs_buf		*bp, *agbp;
+	struct xfs_agf		*agf;
+	__be32			bno;
+	int			stat, error;
+
+	error = __xfs_refcountbt_alloc_block(tp, agno, XFS_AG_RESV_NONE,
+			&bno, &stat);
+	if (error)
+		return error;
+
+	bp = xfs_trans_get_buf(tp, mp->m_ddev_targp,
+			XFS_AGB_TO_DADDR(mp, agno, be32_to_cpu(bno)),
+			mp->m_bsize, 0);
+	if (!bp)
+		return -ENOMEM;
+
+	bp->b_ops = &xfs_refcountbt_buf_ops;
+	xfs_btree_init_block(mp, bp, XFS_REFC_CRC_MAGIC, 0, 0, agno,
+		XFS_BTREE_CRC_BLOCKS);
+	xfs_trans_buf_set_type(tp, bp, XFS_BLFT_BTREE_BUF);
+	xfs_trans_log_buf(tp, bp, 0, XFS_BTREE_SBLOCK_CRC_LEN - 1);
+
+	error = xfs_alloc_read_agf(mp, tp, agno, 0, &agbp);
+	if (error)
+		return error;
+
+	agf = XFS_BUF_TO_AGF(agbp);
+	agf->agf_refcount_root = bno;
+	agf->agf_refcount_level = cpu_to_be32(1);
+
+	pag = xfs_perag_get(mp, agno);
+	pag->pagf_refcount_level = 1;
+	xfs_perag_put(pag);
+
+	xfs_alloc_log_agf(tp, agbp,
+			XFS_AGF_REFCOUNT_ROOT | XFS_AGF_REFCOUNT_LEVEL);
+	return 0;
+}
+
+int
+xfs_reflink_add(
+	struct xfs_mount	*mp)
+{
+	struct xfs_trans	*tp = NULL;
+	int			error, i;
+
+	tp = xfs_trans_alloc(mp, XFS_TRANS_STRAT_WRITE);
+	tp->t_flags |= XFS_TRANS_RESERVE;
+	error = xfs_trans_reserve(tp, &M_RES(mp)->tr_add_reflink,
+			mp->m_sb.sb_agcount, 0);
+	if (error)
+		goto out_trans_cancel;
+
+	for (i = 0; i < mp->m_sb.sb_agcount; i++) {
+		xfs_log_sb(tp);
+
+		error = xfs_reflink_ag_add(tp, i);
+		if (error)
+			goto out_trans_cancel;
+
+		error = xfs_trans_roll(&tp, NULL);
+		if (error)
+			goto out_trans_cancel;
+	}
+
+	mp->m_sb.sb_features_ro_compat |= XFS_SB_FEAT_RO_COMPAT_REFLINK;
+	xfs_log_sb(tp);
+
+	return xfs_trans_commit(tp);
+
+out_trans_cancel:
+	if (tp)
+		xfs_trans_cancel(tp);
+	return error;
+}
diff --git a/fs/xfs/libxfs/xfs_refcount_btree.h b/fs/xfs/libxfs/xfs_refcount_btree.h
index 6f4bf70..481e0d0 100644
--- a/fs/xfs/libxfs/xfs_refcount_btree.h
+++ b/fs/xfs/libxfs/xfs_refcount_btree.h
@@ -70,4 +70,6 @@ extern xfs_extlen_t xfs_refcountbt_max_size(struct xfs_mount *mp);
 extern int xfs_refcountbt_calc_reserves(struct xfs_mount *mp,
 		xfs_agnumber_t agno, xfs_extlen_t *ask, xfs_extlen_t *used);
 
+extern int xfs_reflink_add(struct xfs_mount *mp);
+
 #endif	/* __XFS_REFCOUNT_BTREE_H__ */
diff --git a/fs/xfs/libxfs/xfs_trans_resv.c b/fs/xfs/libxfs/xfs_trans_resv.c
index d53fe89..346c0c1 100644
--- a/fs/xfs/libxfs/xfs_trans_resv.c
+++ b/fs/xfs/libxfs/xfs_trans_resv.c
@@ -802,6 +802,25 @@ xfs_calc_sb_reservation(
 	return xfs_calc_buf_res(1, mp->m_sb.sb_sectsize);
 }
 
+/*
+ * For adding the reflinking we need to allocate the new root block
+ * and modify the AGF and SB, giving:
+ *    the AGF: sectorsize
+ *    the superblock for the reflink flag: sector size
+ *    the reflink root block itself: sector size
+ *    the allocation btrees: 2 trees * (max depth - 1) * block size
+ */
+STATIC uint
+xfs_calc_add_reflink_resv_alloc(
+	struct xfs_mount	*mp)
+{
+	return xfs_calc_buf_res(1, mp->m_sb.sb_sectsize) +
+		mp->m_sb.sb_sectsize +
+		mp->m_sb.sb_sectsize +
+		xfs_calc_buf_res(xfs_allocfree_log_count(mp, 1),
+				 XFS_FSB_TO_B(mp, 1));
+}
+
 void
 xfs_trans_resv_calc(
 	struct xfs_mount	*mp,
@@ -885,6 +904,10 @@ xfs_trans_resv_calc(
 		resp->tr_qm_dqalloc.tr_logcount = XFS_WRITE_LOG_COUNT;
 	resp->tr_qm_dqalloc.tr_logflags |= XFS_TRANS_PERM_LOG_RES;
 
+	resp->tr_add_reflink.tr_logres = xfs_calc_add_reflink_resv_alloc(mp);
+	resp->tr_add_reflink.tr_logcount = XFS_DEFAULT_LOG_COUNT;
+	resp->tr_add_reflink.tr_logflags = XFS_TRANS_PERM_LOG_RES;
+
 	/*
 	 * The following transactions are logged in logical format with
 	 * a default log count.
diff --git a/fs/xfs/libxfs/xfs_trans_resv.h b/fs/xfs/libxfs/xfs_trans_resv.h
index cf734cf..1c007da 100644
--- a/fs/xfs/libxfs/xfs_trans_resv.h
+++ b/fs/xfs/libxfs/xfs_trans_resv.h
@@ -60,6 +60,7 @@ struct xfs_trans_resv {
 	struct xfs_trans_res	tr_qm_dqalloc;	/* allocate quota on disk */
 	struct xfs_trans_res	tr_qm_quotaoff;	/* turn quota off */
 	struct xfs_trans_res	tr_qm_equotaoff;/* end of turn quota off */
+	struct xfs_trans_res	tr_add_reflink; /* add reflink */
 	struct xfs_trans_res	tr_sb;		/* modify superblock */
 	struct xfs_trans_res	tr_fsyncts;	/* update timestamps on fsync */
 };
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 792f547..6e4cebf 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -962,11 +962,27 @@ xfs_mountfs(
 
 		xfs_fs_reserve_ag_blocks(mp);
 
-		/* Recover any CoW blocks that never got remapped. */
-		error = xfs_reflink_recover_cow(mp);
-		if (error && !XFS_FORCED_SHUTDOWN(mp))
-			xfs_err(mp,
+		if (!xfs_sb_version_hasreflink(&mp->m_sb) &&
+		    (mp->m_flags & XFS_MOUNT_REFLINK)) {
+			if (XFS_SB_VERSION_NUM(&mp->m_sb) < XFS_SB_VERSION_5) {
+				xfs_warn(mp,
+	"Can't enable reflinks on version %d superblock.",
+					XFS_SB_VERSION_NUM(&mp->m_sb));
+				return -EINVAL;
+			}
+
+			error = xfs_reflink_add(mp);
+			if (error) {
+				xfs_err(mp,
+	"Failed to enable reflinks: %d\n", error);
+			}
+		} else {
+			/* Recover any CoW blocks that never got remapped. */
+			error = xfs_reflink_recover_cow(mp);
+			if (error && !XFS_FORCED_SHUTDOWN(mp))
+				xfs_err(mp,
 	"Error %d recovering leftover CoW allocations.", error);
+		}
 	}
 
 	return 0;
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index c2e1294..e3002cb 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -178,6 +178,8 @@ typedef struct xfs_mount {
 #define XFS_MOUNT_WSYNC		(1ULL << 0)	/* for nfs - all metadata ops
 						   must be synchronous except
 						   for space allocations */
+#define XFS_MOUNT_REFLINK	(1ULL << 1)	/* allow use of reflinks (will
+						   be permanent once used) */
 #define XFS_MOUNT_WAS_CLEAN	(1ULL << 3)
 #define XFS_MOUNT_FS_SHUTDOWN	(1ULL << 4)	/* atomic stop of all filesystem
 						   operations, typically for
@@ -229,7 +231,8 @@ typedef struct xfs_mount {
 
 static inline bool xfs_mp_hasreflink(struct xfs_mount *mp)
 {
-	return xfs_sb_version_hasreflink(&mp->m_sb);
+	return xfs_sb_version_hasreflink(&mp->m_sb) ||
+		(mp->m_flags & XFS_MOUNT_REFLINK);
 }
 
 /*
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 84348af..dfa5077 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -82,7 +82,7 @@ enum {
 	Opt_quota, Opt_noquota, Opt_usrquota, Opt_grpquota, Opt_prjquota,
 	Opt_uquota, Opt_gquota, Opt_pquota,
 	Opt_uqnoenforce, Opt_gqnoenforce, Opt_pqnoenforce, Opt_qnoenforce,
-	Opt_discard, Opt_nodiscard, Opt_dax, Opt_err,
+	Opt_discard, Opt_nodiscard, Opt_reflink, Opt_dax, Opt_err,
 };
 
 static const match_table_t tokens = {
@@ -132,6 +132,7 @@ static const match_table_t tokens = {
 	{Opt_qnoenforce, "qnoenforce"},	/* same as uqnoenforce */
 	{Opt_discard,	"discard"},	/* Discard unused blocks */
 	{Opt_nodiscard,	"nodiscard"},	/* Do not discard unused blocks */
+	{Opt_reflink,	"reflink"},	/* Do not discard unused blocks */
 
 	{Opt_dax,	"dax"},		/* Enable direct access to bdev pages */
 	{Opt_err,	NULL},
@@ -219,6 +220,7 @@ xfs_parseargs(
 	 */
 	mp->m_flags |= XFS_MOUNT_BARRIER;
 	mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
+	mp->m_flags |= XFS_MOUNT_REFLINK;
 
 	/*
 	 * These can be overridden by the mount option parsing.
@@ -368,6 +370,9 @@ xfs_parseargs(
 		case Opt_nodiscard:
 			mp->m_flags &= ~XFS_MOUNT_DISCARD;
 			break;
+		case Opt_reflink:
+			mp->m_flags |= XFS_MOUNT_REFLINK;
+			break;
 #ifdef CONFIG_FS_DAX
 		case Opt_dax:
 			mp->m_flags |= XFS_MOUNT_DAX;
-- 
2.1.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-06-02 14:19 [RFC] allow enabling reflinks at runtime Christoph Hellwig
                   ` (2 preceding siblings ...)
  2016-06-02 14:19 ` [PATCH 3/3] xfs: add an option to enable reflinks at mount time Christoph Hellwig
@ 2016-06-02 22:54 ` Dave Chinner
  2016-06-03  1:58   ` Darrick J. Wong
  2016-06-08  7:11   ` Christoph Hellwig
  2016-10-26 20:49 ` Darrick J. Wong
  4 siblings, 2 replies; 21+ messages in thread
From: Dave Chinner @ 2016-06-02 22:54 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs, darrick.wong

On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> I've had some vocal user requests to allow enabling reflinks at run time,
> which happens to be a mostly trivial feature.  The only caveat is that we
> need a large enough log size to support the reflink requirements, but for
> typical large file systems that's not an issue.

Hmmm - how does this interact with all the rmap code? I was not
planning on enabling reflink without rmap and vice versa simply
because it makes the validation and testing matrix vastly more
complex. Indeed, having reflink turned on after a filesystem has
aged for some time (i.e. from unknown initial conditions) makes
validation especially tricky....

Darrick?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-06-02 22:54 ` [RFC] allow enabling reflinks at runtime Dave Chinner
@ 2016-06-03  1:58   ` Darrick J. Wong
  2016-06-06 18:52     ` Darrick J. Wong
  2016-06-08  7:10     ` Christoph Hellwig
  2016-06-08  7:11   ` Christoph Hellwig
  1 sibling, 2 replies; 21+ messages in thread
From: Darrick J. Wong @ 2016-06-03  1:58 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Christoph Hellwig, xfs

On Fri, Jun 03, 2016 at 08:54:15AM +1000, Dave Chinner wrote:
> On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> > I've had some vocal user requests to allow enabling reflinks at run time,
> > which happens to be a mostly trivial feature.  The only caveat is that we
> > need a large enough log size to support the reflink requirements, but for
> > typical large file systems that's not an issue.
> 
> Hmmm - how does this interact with all the rmap code? I was not
> planning on enabling reflink without rmap and vice versa simply
> because it makes the validation and testing matrix vastly more
> complex. Indeed, having reflink turned on after a filesystem has
> aged for some time (i.e. from unknown initial conditions) makes
> validation especially tricky....

Well...

It's not strictly impossible, but there will be some problems running
repair and remounting.

The patchset doesn't actually check that we satisfy the minimum log
space requirement, which will result in xfs refusing to mount.  As
Christoph says, this is only an issue on small FSes, but nevertheless,
we shouldn't trap the user like that.

Second, mkfs lays out all the AG btree roots at the start of the AG
before finding an aligned inode block for the root inode.  xfs_repair
feeds the same algorithm from the on-disk feature fields to check that
s_rootino is sane, and gets very unhappy if it doesn't find the root
inode at the computed location.  Adding the two btree root blocks is
enough to shift the root inode from 96 to 128.  This all can be fixed,
but it /was/ convenient not to have to support weirdo upgraded XFSes
like ext4. :)

Furthermore, if you turn on reflink, you should enable the per-AG
reservations so we don't crash the FS by running out of space when it
needs a block for the refcountbt.

--D

> 
> Darrick?
> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 3/3] xfs: add an option to enable reflinks at mount time
  2016-06-02 14:19 ` [PATCH 3/3] xfs: add an option to enable reflinks at mount time Christoph Hellwig
@ 2016-06-06 11:23   ` Carlos Maiolino
  2016-06-06 11:29     ` Carlos Maiolino
  2016-06-08  7:04     ` Christoph Hellwig
  0 siblings, 2 replies; 21+ messages in thread
From: Carlos Maiolino @ 2016-06-06 11:23 UTC (permalink / raw)
  To: xfs

Hi hch,

The patchset looks good, although I'm not quite familiar with the reflink code
so, I apologize if it is a stupid question

After enabling the reflink feature during mount time, I believe this will not
have any problems in future mounts of this filesystem without reflink support?

> index 84348af..dfa5077 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -82,7 +82,7 @@ enum {
>  	Opt_quota, Opt_noquota, Opt_usrquota, Opt_grpquota, Opt_prjquota,
>  	Opt_uquota, Opt_gquota, Opt_pquota,
>  	Opt_uqnoenforce, Opt_gqnoenforce, Opt_pqnoenforce, Opt_qnoenforce,
> -	Opt_discard, Opt_nodiscard, Opt_dax, Opt_err,
> +	Opt_discard, Opt_nodiscard, Opt_reflink, Opt_dax, Opt_err,
>  };
>  
>  static const match_table_t tokens = {
> @@ -132,6 +132,7 @@ static const match_table_t tokens = {
>  	{Opt_qnoenforce, "qnoenforce"},	/* same as uqnoenforce */
>  	{Opt_discard,	"discard"},	/* Discard unused blocks */
>  	{Opt_nodiscard,	"nodiscard"},	/* Do not discard unused blocks */
> +	{Opt_reflink,	"reflink"},	/* Do not discard unused blocks */
						^^^^

Also, I believe this comment is wrong!?

Cheers

-- 
Carlos

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 3/3] xfs: add an option to enable reflinks at mount time
  2016-06-06 11:23   ` Carlos Maiolino
@ 2016-06-06 11:29     ` Carlos Maiolino
  2016-06-06 16:52       ` Darrick J. Wong
  2016-06-08  7:04     ` Christoph Hellwig
  1 sibling, 1 reply; 21+ messages in thread
From: Carlos Maiolino @ 2016-06-06 11:29 UTC (permalink / raw)
  To: xfs

Ugh, I just realized dave and derrick had already replied, pointing issues I
didn't figure out, but still I'm curious for the question I asked :)

> Hi hch,
> 
> The patchset looks good, although I'm not quite familiar with the reflink code
> so, I apologize if it is a stupid question
> 
> After enabling the reflink feature during mount time, I believe this will not
> have any problems in future mounts of this filesystem without reflink support?
> 
> > index 84348af..dfa5077 100644
> > --- a/fs/xfs/xfs_super.c
> > +++ b/fs/xfs/xfs_super.c
> > @@ -82,7 +82,7 @@ enum {
> >  	Opt_quota, Opt_noquota, Opt_usrquota, Opt_grpquota, Opt_prjquota,
> >  	Opt_uquota, Opt_gquota, Opt_pquota,
> >  	Opt_uqnoenforce, Opt_gqnoenforce, Opt_pqnoenforce, Opt_qnoenforce,
> > -	Opt_discard, Opt_nodiscard, Opt_dax, Opt_err,
> > +	Opt_discard, Opt_nodiscard, Opt_reflink, Opt_dax, Opt_err,
> >  };
> >  
> >  static const match_table_t tokens = {
> > @@ -132,6 +132,7 @@ static const match_table_t tokens = {
> >  	{Opt_qnoenforce, "qnoenforce"},	/* same as uqnoenforce */
> >  	{Opt_discard,	"discard"},	/* Discard unused blocks */
> >  	{Opt_nodiscard,	"nodiscard"},	/* Do not discard unused blocks */
> > +	{Opt_reflink,	"reflink"},	/* Do not discard unused blocks */
> 						^^^^
> 
> Also, I believe this comment is wrong!?
> 
> Cheers
> 
> -- 
> Carlos
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

-- 
Carlos

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 3/3] xfs: add an option to enable reflinks at mount time
  2016-06-06 11:29     ` Carlos Maiolino
@ 2016-06-06 16:52       ` Darrick J. Wong
  0 siblings, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2016-06-06 16:52 UTC (permalink / raw)
  To: xfs

On Mon, Jun 06, 2016 at 01:29:50PM +0200, Carlos Maiolino wrote:
> Ugh, I just realized dave and derrick had already replied, pointing issues I
> didn't figure out, but still I'm curious for the question I asked :)
> 
> > Hi hch,
> > 
> > The patchset looks good, although I'm not quite familiar with the reflink code
> > so, I apologize if it is a stupid question
> > 
> > After enabling the reflink feature during mount time, I believe this will not
> > have any problems in future mounts of this filesystem without reflink support?
> > 
> > > index 84348af..dfa5077 100644
> > > --- a/fs/xfs/xfs_super.c
> > > +++ b/fs/xfs/xfs_super.c
> > > @@ -82,7 +82,7 @@ enum {
> > >  	Opt_quota, Opt_noquota, Opt_usrquota, Opt_grpquota, Opt_prjquota,
> > >  	Opt_uquota, Opt_gquota, Opt_pquota,
> > >  	Opt_uqnoenforce, Opt_gqnoenforce, Opt_pqnoenforce, Opt_qnoenforce,
> > > -	Opt_discard, Opt_nodiscard, Opt_dax, Opt_err,
> > > +	Opt_discard, Opt_nodiscard, Opt_reflink, Opt_dax, Opt_err,
> > >  };
> > >  
> > >  static const match_table_t tokens = {
> > > @@ -132,6 +132,7 @@ static const match_table_t tokens = {
> > >  	{Opt_qnoenforce, "qnoenforce"},	/* same as uqnoenforce */
> > >  	{Opt_discard,	"discard"},	/* Discard unused blocks */
> > >  	{Opt_nodiscard,	"nodiscard"},	/* Do not discard unused blocks */
> > > +	{Opt_reflink,	"reflink"},	/* Do not discard unused blocks */
> > 						^^^^

I hadn't noticed the incorrect comment; it's good of you to point it out. :)

--D

> > 
> > Also, I believe this comment is wrong!?
> > 
> > Cheers
> > 
> > -- 
> > Carlos
> > 
> > _______________________________________________
> > xfs mailing list
> > xfs@oss.sgi.com
> > http://oss.sgi.com/mailman/listinfo/xfs
> 
> -- 
> Carlos
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-06-03  1:58   ` Darrick J. Wong
@ 2016-06-06 18:52     ` Darrick J. Wong
  2016-06-08  7:10     ` Christoph Hellwig
  1 sibling, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2016-06-06 18:52 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Christoph Hellwig, xfs

On Thu, Jun 02, 2016 at 06:58:33PM -0700, Darrick J. Wong wrote:
> On Fri, Jun 03, 2016 at 08:54:15AM +1000, Dave Chinner wrote:
> > On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> > > I've had some vocal user requests to allow enabling reflinks at run time,
> > > which happens to be a mostly trivial feature.  The only caveat is that we
> > > need a large enough log size to support the reflink requirements, but for
> > > typical large file systems that's not an issue.
> > 
> > Hmmm - how does this interact with all the rmap code? I was not
> > planning on enabling reflink without rmap and vice versa simply
> > because it makes the validation and testing matrix vastly more
> > complex. Indeed, having reflink turned on after a filesystem has
> > aged for some time (i.e. from unknown initial conditions) makes
> > validation especially tricky....
> 
> Well...
> 
> It's not strictly impossible, but there will be some problems running
> repair and remounting.
> 
> The patchset doesn't actually check that we satisfy the minimum log
> space requirement, which will result in xfs refusing to mount.  As
> Christoph says, this is only an issue on small FSes, but nevertheless,
> we shouldn't trap the user like that.
> 
> Second, mkfs lays out all the AG btree roots at the start of the AG
> before finding an aligned inode block for the root inode.  xfs_repair
> feeds the same algorithm from the on-disk feature fields to check that
> s_rootino is sane, and gets very unhappy if it doesn't find the root
> inode at the computed location.  Adding the two btree root blocks is
> enough to shift the root inode from 96 to 128.  This all can be fixed,
> but it /was/ convenient not to have to support weirdo upgraded XFSes
> like ext4. :)

We could reprogram mkfs to allocate the root inode at a sufficiently
high block offset that we'll probably never see a collision between
the rootino block and mkfs-time AG btree roots.  That seems like less
work than fiddling with everything that assumes that the first
xfs_prealloc_blocks are reserved for AG metadata to leave a hole for
the rootino chunk.

I think we could create an incompat feature flag to mark this 'high
offset root inode'.  mkfs will turn on the flag if any feature at
least as new as rmap is enabled.  That way, reflink can be turned on
for pre-rmap v5 filesystems (where the increase in AG btree roots
won't move the calculated rootino) or for post-rmap v5 filesystems
(where we put rootino at a high enough offset that we won't have a
problem).

--D

> 
> Furthermore, if you turn on reflink, you should enable the per-AG
> reservations so we don't crash the FS by running out of space when it
> needs a block for the refcountbt.
> 
> --D
> 
> > 
> > Darrick?
> > 
> > Cheers,
> > 
> > Dave.
> > -- 
> > Dave Chinner
> > david@fromorbit.com
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 3/3] xfs: add an option to enable reflinks at mount time
  2016-06-06 11:23   ` Carlos Maiolino
  2016-06-06 11:29     ` Carlos Maiolino
@ 2016-06-08  7:04     ` Christoph Hellwig
  2016-06-08  8:07       ` Carlos Maiolino
  1 sibling, 1 reply; 21+ messages in thread
From: Christoph Hellwig @ 2016-06-08  7:04 UTC (permalink / raw)
  To: xfs, cmaiolino

Yes, the comment is wrong.  Any reason you didn't include me in the
reply?  Also it seems your reply-to also magically drops you
from the reply.  Are you using a new mailer? :)

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-06-03  1:58   ` Darrick J. Wong
  2016-06-06 18:52     ` Darrick J. Wong
@ 2016-06-08  7:10     ` Christoph Hellwig
  1 sibling, 0 replies; 21+ messages in thread
From: Christoph Hellwig @ 2016-06-08  7:10 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Christoph Hellwig, xfs

On Thu, Jun 02, 2016 at 06:58:33PM -0700, Darrick J. Wong wrote:
> On Fri, Jun 03, 2016 at 08:54:15AM +1000, Dave Chinner wrote:
> > On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> > > I've had some vocal user requests to allow enabling reflinks at run time,
> > > which happens to be a mostly trivial feature.  The only caveat is that we
> > > need a large enough log size to support the reflink requirements, but for
> > > typical large file systems that's not an issue.
> > 
> > Hmmm - how does this interact with all the rmap code? I was not
> > planning on enabling reflink without rmap and vice versa simply
> > because it makes the validation and testing matrix vastly more
> > complex. Indeed, having reflink turned on after a filesystem has
> > aged for some time (i.e. from unknown initial conditions) makes
> > validation especially tricky....
> 
> Well...
> 
> It's not strictly impossible, but there will be some problems running
> repair and remounting.
> 
> The patchset doesn't actually check that we satisfy the minimum log
> space requirement, which will result in xfs refusing to mount.  As
> Christoph says, this is only an issue on small FSes, but nevertheless,
> we shouldn't trap the user like that.

xfs_log_mount always verified the required log size.

> Second, mkfs lays out all the AG btree roots at the start of the AG
> before finding an aligned inode block for the root inode.  xfs_repair
> feeds the same algorithm from the on-disk feature fields to check that
> s_rootino is sane, and gets very unhappy if it doesn't find the root
> inode at the computed location.  Adding the two btree root blocks is
> enough to shift the root inode from 96 to 128.  This all can be fixed,
> but it /was/ convenient not to have to support weirdo upgraded XFSes
> like ext4. :)

Yes, that algorithm might be unhappy, but I don't think it's overly
smart to rely on it either.

> Furthermore, if you turn on reflink, you should enable the per-AG
> reservations so we don't crash the FS by running out of space when it
> needs a block for the refcountbt.

xfs_refcountbt_calc_reserves is switched to use xfs_mp_hasreflink,
so it will do the right thing.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-06-02 22:54 ` [RFC] allow enabling reflinks at runtime Dave Chinner
  2016-06-03  1:58   ` Darrick J. Wong
@ 2016-06-08  7:11   ` Christoph Hellwig
  2016-06-09 17:45     ` Darrick J. Wong
  2016-06-09 23:33     ` Dave Chinner
  1 sibling, 2 replies; 21+ messages in thread
From: Christoph Hellwig @ 2016-06-08  7:11 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs, darrick.wong

On Fri, Jun 03, 2016 at 08:54:15AM +1000, Dave Chinner wrote:
> On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> > I've had some vocal user requests to allow enabling reflinks at run time,
> > which happens to be a mostly trivial feature.  The only caveat is that we
> > need a large enough log size to support the reflink requirements, but for
> > typical large file systems that's not an issue.
> 
> Hmmm - how does this interact with all the rmap code? I was not
> planning on enabling reflink without rmap and vice versa simply
> because it makes the validation and testing matrix vastly more
> complex.

Uh.  So far I've only been testing pure reflink code, mostly because
rmap really doesn't buy much for the use case I'm working on.
Enabling rmap post-mkfs is defintively a different ballpark, and probably
not worth it even if it would be doable.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 3/3] xfs: add an option to enable reflinks at mount time
  2016-06-08  7:04     ` Christoph Hellwig
@ 2016-06-08  8:07       ` Carlos Maiolino
  2016-06-08  8:10         ` Carlos Maiolino
  0 siblings, 1 reply; 21+ messages in thread
From: Carlos Maiolino @ 2016-06-08  8:07 UTC (permalink / raw)
  To: xfs

On Wed, Jun 08, 2016 at 12:04:59AM -0700, Christoph Hellwig wrote:
> Yes, the comment is wrong.  Any reason you didn't include me in the
> reply?  Also it seems your reply-to also magically drops you
> from the reply.  Are you using a new mailer? :)

No, no reason, I missed to CC you. Maybe my CTRL-L list-reply in mutt screwed up
with the destination fields, I should come back to group replies, thanks for the
heads up :)

-- 
Carlos

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 3/3] xfs: add an option to enable reflinks at mount time
  2016-06-08  8:07       ` Carlos Maiolino
@ 2016-06-08  8:10         ` Carlos Maiolino
  2016-06-09 22:57           ` Dave Chinner
  0 siblings, 1 reply; 21+ messages in thread
From: Carlos Maiolino @ 2016-06-08  8:10 UTC (permalink / raw)
  To: xfs; +Cc: hch

On Wed, Jun 08, 2016 at 10:07:03AM +0200, Carlos Maiolino wrote:
> On Wed, Jun 08, 2016 at 12:04:59AM -0700, Christoph Hellwig wrote:
> > Yes, the comment is wrong.  Any reason you didn't include me in the
> > reply?  Also it seems your reply-to also magically drops you
> > from the reply.  Are you using a new mailer? :)
> 
> No, no reason, I missed to CC you. Maybe my CTRL-L list-reply in mutt screwed up
> with the destination fields, I should come back to group replies, thanks for the
> heads up :)

Oh crap, I did it again, ok, no more list-reply for me
> 
> -- 
> Carlos
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

-- 
Carlos

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-06-08  7:11   ` Christoph Hellwig
@ 2016-06-09 17:45     ` Darrick J. Wong
  2016-06-09 23:33     ` Dave Chinner
  1 sibling, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2016-06-09 17:45 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs

On Wed, Jun 08, 2016 at 09:11:30AM +0200, Christoph Hellwig wrote:
> On Fri, Jun 03, 2016 at 08:54:15AM +1000, Dave Chinner wrote:
> > On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> > > I've had some vocal user requests to allow enabling reflinks at run time,
> > > which happens to be a mostly trivial feature.  The only caveat is that we
> > > need a large enough log size to support the reflink requirements, but for
> > > typical large file systems that's not an issue.
> > 
> > Hmmm - how does this interact with all the rmap code? I was not
> > planning on enabling reflink without rmap and vice versa simply
> > because it makes the validation and testing matrix vastly more
> > complex.
> 
> Uh.  So far I've only been testing pure reflink code, mostly because
> rmap really doesn't buy much for the use case I'm working on.

So far I've mostly been testing with mkfs.xfs -i sparse=1 -m rmapbt=1,reflink=1
on the assumption that sparse will get turned on soon and that it
might help a lot in the post-COW fragmentation world.

(Hoping that the cowextsize defaults avoid most of the horrifying
fragmentation that we see on the second- and last-letter filesystems.)

> Enabling rmap post-mkfs is defintively a different ballpark, and probably
> not worth it even if it would be doable.

Hughflgrgh.  I wasn't even going to consider /that/ possibility. :)

(I guess you could flip on the feature bit and run xfs_repair...)

--D

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH 3/3] xfs: add an option to enable reflinks at mount time
  2016-06-08  8:10         ` Carlos Maiolino
@ 2016-06-09 22:57           ` Dave Chinner
  0 siblings, 0 replies; 21+ messages in thread
From: Dave Chinner @ 2016-06-09 22:57 UTC (permalink / raw)
  To: xfs, hch

On Wed, Jun 08, 2016 at 10:10:07AM +0200, Carlos Maiolino wrote:
> On Wed, Jun 08, 2016 at 10:07:03AM +0200, Carlos Maiolino wrote:
> > On Wed, Jun 08, 2016 at 12:04:59AM -0700, Christoph Hellwig wrote:
> > > Yes, the comment is wrong.  Any reason you didn't include me in the
> > > reply?  Also it seems your reply-to also magically drops you
> > > from the reply.  Are you using a new mailer? :)
> > 
> > No, no reason, I missed to CC you. Maybe my CTRL-L list-reply in mutt screwed up
> > with the destination fields, I should come back to group replies, thanks for the
> > heads up :)
> 
> Oh crap, I did it again, ok, no more list-reply for me

If you are using mutt, then just use "g" for group reply. I've never
used anything else - it just does the right thing. I didn't even
know that "list-reply" was something that people used....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-06-08  7:11   ` Christoph Hellwig
  2016-06-09 17:45     ` Darrick J. Wong
@ 2016-06-09 23:33     ` Dave Chinner
  2016-07-13  5:36       ` Darrick J. Wong
  1 sibling, 1 reply; 21+ messages in thread
From: Dave Chinner @ 2016-06-09 23:33 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs, darrick.wong

On Wed, Jun 08, 2016 at 09:11:30AM +0200, Christoph Hellwig wrote:
> On Fri, Jun 03, 2016 at 08:54:15AM +1000, Dave Chinner wrote:
> > On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> > > I've had some vocal user requests to allow enabling reflinks at run time,
> > > which happens to be a mostly trivial feature.  The only caveat is that we
> > > need a large enough log size to support the reflink requirements, but for
> > > typical large file systems that's not an issue.
> > 
> > Hmmm - how does this interact with all the rmap code? I was not
> > planning on enabling reflink without rmap and vice versa simply
> > because it makes the validation and testing matrix vastly more
> > complex.
> 
> Uh.  So far I've only been testing pure reflink code, mostly because
> rmap really doesn't buy much for the use case I'm working on.
> Enabling rmap post-mkfs is defintively a different ballpark, and probably
> not worth it even if it would be doable.

Wasn't expecting rmap to ever be dynamically enabled ;)

So ignoring the testing side of things, and looking more at the
implementation of the enabling, I'm not sure I really like the idea
of doing this via a mount option. Because we've got to make
significant additions to the on disk format in each AG, this seems
more like a "growfs style" operation than anything. i.e. lock out
allocation, add all the structures to the AG headers and allocate
all the blocks needed, re-initialise the per-ag structures with all
the necessary info, then switch on the feature bit and commit the
change.

It's probably a little more intricate than doing it at mount time,
but it gets around the fact that users have to add a mount option
and bounce the filesystem to turn on reflinks.
I can see this being much easier than a mount option in some
situations, (e.g. for the root filesystem), and I don't think it's
much harder to test than the mount option (e.g. the way growfs is
tested under stress by xfs/104)...

Your thoughts, Christoph?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-06-09 23:33     ` Dave Chinner
@ 2016-07-13  5:36       ` Darrick J. Wong
  0 siblings, 0 replies; 21+ messages in thread
From: Darrick J. Wong @ 2016-07-13  5:36 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Christoph Hellwig, xfs

On Fri, Jun 10, 2016 at 09:33:44AM +1000, Dave Chinner wrote:
> On Wed, Jun 08, 2016 at 09:11:30AM +0200, Christoph Hellwig wrote:
> > On Fri, Jun 03, 2016 at 08:54:15AM +1000, Dave Chinner wrote:
> > > On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> > > > I've had some vocal user requests to allow enabling reflinks at run time,
> > > > which happens to be a mostly trivial feature.  The only caveat is that we
> > > > need a large enough log size to support the reflink requirements, but for
> > > > typical large file systems that's not an issue.
> > > 
> > > Hmmm - how does this interact with all the rmap code? I was not
> > > planning on enabling reflink without rmap and vice versa simply
> > > because it makes the validation and testing matrix vastly more
> > > complex.
> > 
> > Uh.  So far I've only been testing pure reflink code, mostly because
> > rmap really doesn't buy much for the use case I'm working on.
> > Enabling rmap post-mkfs is defintively a different ballpark, and probably
> > not worth it even if it would be doable.
> 
> Wasn't expecting rmap to ever be dynamically enabled ;)
> 
> So ignoring the testing side of things, and looking more at the
> implementation of the enabling, I'm not sure I really like the idea
> of doing this via a mount option. Because we've got to make
> significant additions to the on disk format in each AG, this seems
> more like a "growfs style" operation than anything. i.e. lock out
> allocation, add all the structures to the AG headers and allocate
> all the blocks needed, re-initialise the per-ag structures with all
> the necessary info, then switch on the feature bit and commit the
> change.

I'd been wondering if we could just make a new FS_SET_GEOMETRY xfsctl
where you'd pass in the same xfs_fsop_geom you got from FSGEOMETRY.
The kernel would either decide that it liked the changes and do them,
or reject the whole thing with -EINVAL.

> It's probably a little more intricate than doing it at mount time,
> but it gets around the fact that users have to add a mount option
> and bounce the filesystem to turn on reflinks.
> I can see this being much easier than a mount option in some
> situations, (e.g. for the root filesystem), and I don't think it's
> much harder to test than the mount option (e.g. the way growfs is
> tested under stress by xfs/104)...

But otherwise we'd probably want to check log size and free counts, and then
fill in the refcount btree root.  We'd also have to make sure that the root
inode chunk doesn't change as a result of xfs_prealloc_blocks changing, since I
think mkfs puts the root inode chunk in the first aligned space after all the
AG metadata.

<shrug> It's been a while, I'll look at this closer when I get back to reflink.

> Your thoughts, Christoph?

--D

> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-06-02 14:19 [RFC] allow enabling reflinks at runtime Christoph Hellwig
                   ` (3 preceding siblings ...)
  2016-06-02 22:54 ` [RFC] allow enabling reflinks at runtime Dave Chinner
@ 2016-10-26 20:49 ` Darrick J. Wong
  2016-11-03 16:10   ` Christoph Hellwig
  4 siblings, 1 reply; 21+ messages in thread
From: Darrick J. Wong @ 2016-10-26 20:49 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs, Dave Chinner

On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> I've had some vocal user requests to allow enabling reflinks at run time,
> which happens to be a mostly trivial feature.  The only caveat is that we
> need a large enough log size to support the reflink requirements, but for
> typical large file systems that's not an issue.

Just out of curiosity, are we still interested in this feature?
A few people were asking on the irc channel today.

--D

> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [RFC] allow enabling reflinks at runtime
  2016-10-26 20:49 ` Darrick J. Wong
@ 2016-11-03 16:10   ` Christoph Hellwig
  0 siblings, 0 replies; 21+ messages in thread
From: Christoph Hellwig @ 2016-11-03 16:10 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Christoph Hellwig, xfs, Dave Chinner

On Wed, Oct 26, 2016 at 01:49:40PM -0700, Darrick J. Wong wrote:
> On Thu, Jun 02, 2016 at 04:19:07PM +0200, Christoph Hellwig wrote:
> > I've had some vocal user requests to allow enabling reflinks at run time,
> > which happens to be a mostly trivial feature.  The only caveat is that we
> > need a large enough log size to support the reflink requirements, but for
> > typical large file systems that's not an issue.
> 
> Just out of curiosity, are we still interested in this feature?
> A few people were asking on the irc channel today.

I still think it is useful, but it's dropped to the bottom of my priority
list as my customer found another way to deploy the feature.  So don't
expect a new version from me anytime soon.

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

end of thread, other threads:[~2016-11-03 16:10 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02 14:19 [RFC] allow enabling reflinks at runtime Christoph Hellwig
2016-06-02 14:19 ` [PATCH 1/3] xfs: add xfs_mp_hasreflink Christoph Hellwig
2016-06-02 14:19 ` [PATCH 2/3] xfs: refactor xfs_refcountbt_alloc_block Christoph Hellwig
2016-06-02 14:19 ` [PATCH 3/3] xfs: add an option to enable reflinks at mount time Christoph Hellwig
2016-06-06 11:23   ` Carlos Maiolino
2016-06-06 11:29     ` Carlos Maiolino
2016-06-06 16:52       ` Darrick J. Wong
2016-06-08  7:04     ` Christoph Hellwig
2016-06-08  8:07       ` Carlos Maiolino
2016-06-08  8:10         ` Carlos Maiolino
2016-06-09 22:57           ` Dave Chinner
2016-06-02 22:54 ` [RFC] allow enabling reflinks at runtime Dave Chinner
2016-06-03  1:58   ` Darrick J. Wong
2016-06-06 18:52     ` Darrick J. Wong
2016-06-08  7:10     ` Christoph Hellwig
2016-06-08  7:11   ` Christoph Hellwig
2016-06-09 17:45     ` Darrick J. Wong
2016-06-09 23:33     ` Dave Chinner
2016-07-13  5:36       ` Darrick J. Wong
2016-10-26 20:49 ` Darrick J. Wong
2016-11-03 16:10   ` Christoph Hellwig

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.