Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: mkfs: enable extended refs by default
@ 2013-11-14 14:09 David Sterba
  2013-11-14 17:49 ` Chris Mason
  0 siblings, 1 reply; 3+ messages in thread
From: David Sterba @ 2013-11-14 14:09 UTC (permalink / raw)
  To: linux-btrfs; +Cc: chris.mason, David Sterba

The feature has been introduced in kernel 3.7 and enabling it by
default is desired.

All features enabled by default are marked as such in
'mkfs.btrfs -O list-all' output.

Signed-off-by: David Sterba <dsterba@suse.cz>
---
 mkfs.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/mkfs.c b/mkfs.c
index cd0af9ef8b4f..bdfc4b170700 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -46,6 +46,8 @@
 
 static u64 index_cnt = 2;
 
+#define DEFAULT_MKFS_FEATURES	(BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF)
+
 #define DEFAULT_MKFS_LEAF_SIZE 16384
 
 struct directory_name_entry {
@@ -1155,10 +1157,15 @@ static void list_all_fs_features(void)
 
 	fprintf(stderr, "Filesystem features available at mkfs time:\n");
 	for (i = 0; i < ARRAY_SIZE(mkfs_features) - 1; i++) {
-		fprintf(stderr, "%-20s- %s (0x%llx)\n",
+		char *is_default = "";
+
+		if (mkfs_features[i].flag & DEFAULT_MKFS_FEATURES)
+			is_default = ", default";
+		fprintf(stderr, "%-20s- %s (0x%llx%s)\n",
 				mkfs_features[i].name,
 				mkfs_features[i].desc,
-				mkfs_features[i].flag);
+				mkfs_features[i].flag,
+				is_default);
 	}
 }
 
@@ -1249,7 +1256,7 @@ int main(int ac, char **av)
 	int dev_cnt = 0;
 	int saved_optind;
 	char estr[100];
-	u64 features = 0;
+	u64 features = DEFAULT_MKFS_FEATURES;
 
 	while(1) {
 		int c;
-- 
1.8.4.2


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

* Re: [PATCH] btrfs-progs: mkfs: enable extended refs by default
  2013-11-14 14:09 [PATCH] btrfs-progs: mkfs: enable extended refs by default David Sterba
@ 2013-11-14 17:49 ` Chris Mason
  2013-11-14 18:40   ` David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Mason @ 2013-11-14 17:49 UTC (permalink / raw)
  To: David Sterba, linux-btrfs; +Cc: David Sterba

Quoting David Sterba (2013-11-14 09:09:53)
> The feature has been introduced in kernel 3.7 and enabling it by
> default is desired.
> 
> All features enabled by default are marked as such in
> 'mkfs.btrfs -O list-all' output.

Has anyone already tested syslinux and grub with extrefs enabled?

-chris

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

* Re: [PATCH] btrfs-progs: mkfs: enable extended refs by default
  2013-11-14 17:49 ` Chris Mason
@ 2013-11-14 18:40   ` David Sterba
  0 siblings, 0 replies; 3+ messages in thread
From: David Sterba @ 2013-11-14 18:40 UTC (permalink / raw)
  To: Chris Mason; +Cc: David Sterba, linux-btrfs

On Thu, Nov 14, 2013 at 12:49:13PM -0500, Chris Mason wrote:
> Quoting David Sterba (2013-11-14 09:09:53)
> > The feature has been introduced in kernel 3.7 and enabling it by
> > default is desired.
> > 
> > All features enabled by default are marked as such in
> > 'mkfs.btrfs -O list-all' output.
> 
> Has anyone already tested syslinux and grub with extrefs enabled?

Extrefs and grub2 is used in opensuse 13.1 and this combination works, I
think that the extended refs are not used for the /boot files at all, so
it works as if no extrefs were enabled.  There is not incompat bit
handling in grub afaics.

david

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

end of thread, other threads:[~2013-11-14 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 14:09 [PATCH] btrfs-progs: mkfs: enable extended refs by default David Sterba
2013-11-14 17:49 ` Chris Mason
2013-11-14 18:40   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox