Skip to contentSkip to conversation

resizing file system

SPAM In review Munro, Fred 4 participants 15 messages Apr 7, 2009 – Oct 3, 2010 11 messages not in the archive NILFS2 filesystem

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): BAEFA5609CC3AB4BAE1625CAD4C27E5C02986E1D-qPLjlnsG5hmCmmEZ8mJCX5vx1ZQ4fP860E9HWUfgJXw@public.gmane.org

#2 lore raw

Hi!

Quoted 3 lines · Fred

I need to grow my partition and my FS. In the future, I will may need to shrink it. Is there a way to resize my nilfs2 fs - something similar to resize2fs for ext2/3?

An experimental resize feature did exist, but it's not applicable to the current version. And, it didn't support shrinking.
So the feature you want is not available now. (Sorry for inconvenience)

I think it's not difficult, but I'm busy with support of mainline merging now. I'd like to address such todo features again after it gets settled.

Regards,
Ryusuke Konishi

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hi,

Quoted 1 line

Hi!

Quoted 2 lines · Ryusuke Konishi
Quoted 1 line · Fred

I need to grow my partition and my FS. In the future, I will may

need

Quoted 4 lines
Quoted 2 lines

to shrink it. Is there a way to resize my nilfs2 fs - something similar to resize2fs for ext2/3?

An experimental resize feature did exist, but it's not applicable to

the current version. And, it didn't

Quoted 2 lines

support shrinking.
So the feature you want is not available now. (Sorry for

inconvenience)

Quoted 2 lines

I think it's not difficult, but I'm busy with support of mainline

merging now. I'd like to address such todo

Quoted 4 lines

features again after it gets settled.

Regards,
Ryusuke Konishi

Thanks for the quick and informative (though disappointing) response, Ryusuke. I can certainly understand your priorities.

Best regards,
- Fred

#5 lore raw
In reply to Ryusuke Konishi
Quoted 3 lines · Ryusuke Konishi

An experimental resize feature did exist, but it's not applicable to the current version. And, it didn't support shrinking.
So the feature you want is not available now. (Sorry for inconvenience)

Ryusuke,

Thanks for developing nilfs2, it is a superb piece of work.

I am interested in the resize feature and willing to implement it, but I need a little help. My understanding of the nilfs2 source code in 2.6.35.4 is that in order to grow a file system it should be sufficient to change s_nsegments in both superblocks while the file system is unmounted. If I understand correctly, the sufile grows automatically to accomodate the additional segments because nilfs_sufile_alloc() calls nilfs_sufile_get_segment_usage_block() with create=1, which grows the sufile as necessary.

Is this interpretation correct? If so, it should not be too hard to code a little utility that grows an unmounted file system. (Later we'll worry about shrinking and online resize.)

You allude to an experimental resize feature. Do you have code that I can adapt to the current version?

Thanks,
Matteo Frigo

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 87iq2cr4sq.fsf_-_-/[email protected]

#7 lore raw

Hi,

Quoted 8 lines · Matteo Frigo
Quoted 3 lines · Ryusuke Konishi

An experimental resize feature did exist, but it's not applicable to the current version. And, it didn't support shrinking.
So the feature you want is not available now. (Sorry for inconvenience)

Ryusuke,

Quoted 7 lines

Thanks for developing nilfs2, it is a superb piece of work.

I am interested in the resize feature and willing to implement it, but I need a little help. My understanding of the nilfs2 source code in 2.6.35.4 is that in order to grow a file system it should be sufficient to change s_nsegments in both superblocks while the file system is unmounted.

Yes, right.

To be precise, you also have to move the secondary superblock, and s_dev_size should be changed, too. Anyway, all that's required for the off-line expansion are these modifications.

Quoted 4 lines

If I understand correctly, the sufile grows automatically to accomodate the additional segments because nilfs_sufile_alloc() calls nilfs_sufile_get_segment_usage_block() with create=1, which grows the sufile as necessary.

Exactly.

Quoted 6 lines

Is this interpretation correct? If so, it should not be too hard to code a little utility that grows an unmounted file system. (Later we'll worry about shrinking and online resize.)

You allude to an experimental resize feature. Do you have code that I can adapt to the current version?

No, the experimental one got completely obsolete. At least, we have no applicable patch after the secondary super block was added.

If someone make a new one, I will apply that.

Recently, Jiro SEKIBA added library functions to modify super blocks. I think, you can implement "nilfs-resize" by enhancing his work, by amending "nilfs_sb_write" function.

The change is available on the latest util's git repo.

Thanks,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw

PATCH 1/1 Compare device number rather than device name for mount check.

To check whether a file system is mounted, nilfs-tune was comparing the device name to the contents of /etc/mtab. This check does not detect a mounted file system when the device has multiple names, which is a common case when using LVM. (LVM creates symbolic links from /dev/mapper/vg-lv to /dev/dm-X.)

This patch, borrowed from the analogous check in e2fsprogs, compares the device number (field st_rdev of struct stat) rather than the device name.

---
 configure.ac                 |    3 +-
 sbin/nilfs-tune/nilfs-tune.c |   69 +++++++++++++++++++++++++++++++----------
 2 files changed, 54 insertions(+), 18 deletions(-)
configure.ac +2 -1
index af75142..963e2fd 100644
@@ -37,7 +37,8 @@ AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h paths.h \
 		  stdlib.h string.h strings.h sys/ioctl.h sys/mount.h \
-		  sys/time.h syslog.h unistd.h linux/types.h grp.h pwd.h])
+		  sys/time.h syslog.h unistd.h linux/types.h grp.h pwd.h \
+		  mntent.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
sbin/nilfs-tune/nilfs-tune.c +52 -17

96 lines not on this page · raw message

Signature · 7 lines
1.7.1


--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 87d3skgjc3.fsf_-_-/[email protected]

#10 lore raw

Re: [PATCH] Compare device number rather than device name for mount check.

Hi,

Quoted 11 lines · Matteo Frigo

To check whether a file system is mounted, nilfs-tune was comparing the device name to the contents of /etc/mtab. This check does not detect a mounted file system when the device has multiple names, which is a common case when using LVM. (LVM creates symbolic links from /dev/mapper/vg-lv to /dev/dm-X.)

This patch, borrowed from the analogous check in e2fsprogs, compares the device number (field st_rdev of struct stat) rather than the device name.

The patch looks sane except for the checkpatch warnings below:

Quoted 9 lines

WARNING: line over 80 characters
#526: FILE: nilfs-tune.c:526:
+ fprintf(stderr, "ERROR: %s is currently mounted. Aborting execution.\n"

WARNING: line over 80 characters
#529: FILE: nilfs-tune.c:529:

sbin/nilfs-tune/nilfs-tune.c +1 -0
+		"You can use the \"-f\" option to force this operation.\n",

total: 0 errors, 2 warnings, 535 lines checked

I will adopt your patch with minor amendment.

Thank you.

Ryusuke Konishi

Quoted 124 lines
---
 configure.ac                 |    3 +-
 sbin/nilfs-tune/nilfs-tune.c |   69 +++++++++++++++++++++++++++++++----------
 2 files changed, 54 insertions(+), 18 deletions(-)
configure.ac +2 -1
index af75142..963e2fd 100644
@@ -37,7 +37,8 @@ AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h paths.h \
 		  stdlib.h string.h strings.h sys/ioctl.h sys/mount.h \
-		  sys/time.h syslog.h unistd.h linux/types.h grp.h pwd.h])
+		  sys/time.h syslog.h unistd.h linux/types.h grp.h pwd.h \
+		  mntent.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
sbin/nilfs-tune/nilfs-tune.c +52 -17
index 18513f2..5b7f030 100644
@@ -58,6 +58,11 @@
 #include <pwd.h>
 #endif	/* HAVE_PWD_H */
 
+#ifdef HAVE_MNTENT_H
+#include <mntent.h>
+#endif
+
+#include <sys/stat.h>
 #include <ctype.h>
 
 #include <errno.h>
@@ -444,26 +449,57 @@ int modify_nilfs(char *device, struct nilfs_tune_options *opts)
 	return ret;
 }
 
-/* Code borrowed from nilfs2-util/sbin/mkfs/mkfs.c */
+/* check_mount() checks whether DEVICE is a mounted file system.
+   Returns 0 if the DEVICE is *not* mounted (which we consider a
+   successful outcome), and -1 if DEVICE is mounted or if the mount
+   status cannot be determined.
+
+   Derived from e2fsprogs/lib/ext2fs/ismounted.c
+   Copyright (C) 1995,1996,1997,1998,1999,2000 Theodore Ts'o,
+   LGPL v2
+*/
 static int check_mount(const char *device)
 {
-	FILE *fp;
-	char line[LINE_BUFFER_SIZE];
-
-	fp = fopen(MOUNTS, "r");
-	if (fp == NULL) {
+	struct mntent *mnt;
+	struct stat st_buf;
+	FILE *f;
+	dev_t file_dev = 0, file_rdev = 0;
+	ino_t file_ino = 0;
+
+	f = setmntent(MOUNTS, "r");
+	if (f == NULL) {
 		fprintf(stderr, "Error: cannot open %s!", MOUNTS);
-		return 1;
+		return -1;
 	}
 
-	while (fgets(line, LINE_BUFFER_SIZE, fp) != NULL) {
-		if (strncmp(strtok(line, " "), device, strlen(device)) == 0) {
-			fclose(fp);
-			return 1;
+	if (stat(device, &st_buf) == 0) {
+		if (S_ISBLK(st_buf.st_mode)) {
+			file_rdev = st_buf.st_rdev;
+		} else {
+			file_dev = st_buf.st_dev;
+			file_ino = st_buf.st_ino;
 		}
 	}
-	fclose(fp);
-	return 0;
+
+	while ((mnt = getmntent(f)) != NULL) {
+		if (mnt->mnt_fsname[0] != '/')
+			continue;
+		if (strcmp(device, mnt->mnt_fsname) == 0)
+			break;
+		if (stat(mnt->mnt_fsname, &st_buf) == 0) {
+			if (S_ISBLK(st_buf.st_mode)) {
+				if (file_rdev && (file_rdev == st_buf.st_rdev))
+					break;
+			} else {
+				if (file_dev && ((file_dev == st_buf.st_dev) &&
+						 (file_ino == st_buf.st_ino)))
+					break;
+			}
+		}
+	}
+
+	endmntent(f);
+	return (mnt == NULL) ? 0 : -1;
 }
 
 int main(int argc, char *argv[])
@@ -486,12 +522,11 @@ int main(int argc, char *argv[])
 		exit(EXIT_FAILURE);
 	}
 
-	if (!opts.force && opts.flags == O_RDWR && check_mount(device)) {
-		fprintf(stderr, "Warning: %s is currently mounted.\n"
+	if (!opts.force && opts.flags == O_RDWR && (check_mount(device) < 0)) {
+		fprintf(stderr, "ERROR: %s is currently mounted.  Aborting execution.\n"
 			"Running nilfs-tune on a mounted file system "
 			"may cause SEVERE damage.\n"
-			"You can force to modify file system by "
-			"\"-f\" option.\n",
+			"You can use the \"-f\" option to force this operation.\n",
 			device);
 		exit(EXIT_SUCCESS);
 	}
Signature · 1 line
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw
In reply to Ryusuke Konishi
Quoted 3 lines · Ryusuke Konishi

To be precise, you also have to move the secondary superblock, and s_dev_size should be changed, too. Anyway, all that's required for the off-line expansion are these modifications.

Ok, I hacked nilfs-tune to change s_dev_size, s_nsegments, and update both superblocks. I ``resized'' a 1GB file system into a 2GB file system. The file system mounts correctly, it has no apparent corruption, and lssu shows all the new segments. Moreover, the cleaner recognizes and cycles through the full 2GB of segments.

However, the free space (as shown by df) is still 1GB, and the file system runs out of space after storing 1GB of data, even though the other 1GB of segments is shown to be empty by lssu.

I also tried updating s_free_blocks_count in the superblock, but this quantity is apparently overwritten by the kernel after mounting the file system.

My analysis of the situation is that the kernel still uses NILFS_SUI(sufile)->ncleansegs from the sufile header, which I am not changing. How do I do that?

Thanks,
Matteo Frigo

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 87zkvnoo1l.fsf-/[email protected]

#13 lore raw
Quoted 16 lines · Matteo Frigo
Quoted 3 lines · Ryusuke Konishi

To be precise, you also have to move the secondary superblock, and s_dev_size should be changed, too. Anyway, all that's required for the off-line expansion are these modifications.

Ok, I hacked nilfs-tune to change s_dev_size, s_nsegments, and update both superblocks. I ``resized'' a 1GB file system into a 2GB file system. The file system mounts correctly, it has no apparent corruption, and lssu shows all the new segments. Moreover, the cleaner recognizes and cycles through the full 2GB of segments.

However, the free space (as shown by df) is still 1GB, and the file system runs out of space after storing 1GB of data, even though the other 1GB of segments is shown to be empty by lssu.

Quoted 7 lines

I also tried updating s_free_blocks_count in the superblock, but this quantity is apparently overwritten by the kernel after mounting the file system.

My analysis of the situation is that the kernel still uses NILFS_SUI(sufile)->ncleansegs from the sufile header, which I am not changing. How do I do that?

Ahh, sorry. ncleansegs was written in the header block of sufile, and we had to change it, too.

It's not difficult to change ncleansegs during mount if we tweaks the kernel code, but I feel it's no longer the best.

Let me think if we can do it straight from userland.

Regards,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw

Hi,

I think it would be good to have a generic libraries for other user land tools, like parted, for the purpose to modify/tweek file system off line. At least, resize/fsck/mkfs are the generic functionalities that parted can handle. So it's good if there is a library that can perform those things to avoid implementing same thing all over the place.

One big problem for parted is that parted is GPL3 and libnilfs2 is GPL2 X). Still, contributers of libnilfs2 are countable, so maybe we can get agreements from all contributers to change licence to LGPL2, isn't it?

Other utilities we can apply the libnilfs2, I can think of, are gvfs modules to handle snapshot from nautilus. I don't know much about gvfs so it doesn't make sense..

Or maybe to create fuse driver for nilfs2 to mount snapshot without super user privilege, which is always obstacles to handle snapshot from end user's point of view.

In any cases, having generic library is key to propagate nilfs2 user land implementations and which library is good to be LGPLed, I think.

Thanks,

regards

At Sun, 12 Sep 2010 11:26:50 +0900 (JST),

Quoted 43 lines · Ryusuke Konishi
Quoted 16 lines · Matteo Frigo
Quoted 3 lines · Ryusuke Konishi

To be precise, you also have to move the secondary superblock, and s_dev_size should be changed, too. Anyway, all that's required for the off-line expansion are these modifications.

Ok, I hacked nilfs-tune to change s_dev_size, s_nsegments, and update both superblocks. I ``resized'' a 1GB file system into a 2GB file system. The file system mounts correctly, it has no apparent corruption, and lssu shows all the new segments. Moreover, the cleaner recognizes and cycles through the full 2GB of segments.

However, the free space (as shown by df) is still 1GB, and the file system runs out of space after storing 1GB of data, even though the other 1GB of segments is shown to be empty by lssu.

Quoted 7 lines

I also tried updating s_free_blocks_count in the superblock, but this quantity is apparently overwritten by the kernel after mounting the file system.

My analysis of the situation is that the kernel still uses NILFS_SUI(sufile)->ncleansegs from the sufile header, which I am not changing. How do I do that?

Ahh, sorry. ncleansegs was written in the header block of sufile, and we had to change it, too.

It's not difficult to change ncleansegs during mount if we tweaks the kernel code, but I feel it's no longer the best.

Let me think if we can do it straight from userland.

Regards,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
Jiro SEKIBA <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 87tylo7msw.wl%[email protected]

#17 lore raw

Hi,

Quoted 11 lines · Jiro SEKIBA

Hi,

I think it would be good to have a generic libraries for other user land tools, like parted, for the purpose to modify/tweek file system off line. At least, resize/fsck/mkfs are the generic functionalities that parted can handle. So it's good if there is a library that can perform those things to avoid implementing same thing all over the place.

One big problem for parted is that parted is GPL3 and libnilfs2 is GPL2 X). Still, contributers of libnilfs2 are countable, so maybe we can get agreements from all contributers to change licence to LGPL2, isn't it?

Definitely yes. I think we should migrate the licence of the library to LGPL2.

One practical problem is that some of the source files derive the kernel code, and they are licensed under GPLv2.

For example, nilfs2_fs.h and crc32.c are just such ones.

Do you think we need replacement for these?

Quoted 7 lines

Other utilities we can apply the libnilfs2, I can think of, are gvfs modules to handle snapshot from nautilus. I don't know much about gvfs so it doesn't make sense..

Or maybe to create fuse driver for nilfs2 to mount snapshot without super user privilege, which is always obstacles to handle snapshot from end user's point of view.

nilfs-utils v1 had an automount support. Unfortunately, it is not included in nilfs-utils-v2, but I think rewriting the script for the v2 utils would help to ease this problem.

Quoted 2 lines

In any cases, having generic library is key to propagate nilfs2 user land implementations and which library is good to be LGPLed, I think.

Reasonable. At least, I agree with the licence migration. Let's consider how to avoid the minor license issue above.

Thanks,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#19 lore raw

Hi,

At Sat, 18 Sep 2010 01:20:00 +0900 (JST),

Quoted 18 lines · Ryusuke Konishi

Hi,

Quoted 11 lines · Jiro SEKIBA

Hi,

I think it would be good to have a generic libraries for other user land tools, like parted, for the purpose to modify/tweek file system off line. At least, resize/fsck/mkfs are the generic functionalities that parted can handle. So it's good if there is a library that can perform those things to avoid implementing same thing all over the place.

One big problem for parted is that parted is GPL3 and libnilfs2 is GPL2 X). Still, contributers of libnilfs2 are countable, so maybe we can get agreements from all contributers to change licence to LGPL2, isn't it?

Definitely yes. I think we should migrate the licence of the library to LGPL2.

Quoted 6 lines

One practical problem is that some of the source files derive the kernel code, and they are licensed under GPLv2.

For example, nilfs2_fs.h and crc32.c are just such ones.

Do you think we need replacement for these?

We could choose to change the licence as LGPL like mqueue.h (*1). However, we may be able to think that license of nilfs2_fs.h won't affect license of user land tools. At least, Linus stated that "There's a clarification that user-space programs that use the standard system call interfaces aren't considered derived works, ..." (*2).

*1) http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=include/linux/mqueue.h;hb=HEAD
*2) http://kerneltrap.org/node/1735

While, crc32.c must be replaced other implementation :(. I'll search lgpled implementation.

thanks,

regards,

Quoted 27 lines
Quoted 7 lines

Other utilities we can apply the libnilfs2, I can think of, are gvfs modules to handle snapshot from nautilus. I don't know much about gvfs so it doesn't make sense..

Or maybe to create fuse driver for nilfs2 to mount snapshot without super user privilege, which is always obstacles to handle snapshot from end user's point of view.

nilfs-utils v1 had an automount support. Unfortunately, it is not included in nilfs-utils-v2, but I think rewriting the script for the v2 utils would help to ease this problem.

Quoted 2 lines

In any cases, having generic library is key to propagate nilfs2 user land implementations and which library is good to be LGPLed, I think.

Reasonable. At least, I agree with the licence migration. Let's consider how to avoid the minor license issue above.

Thanks,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
Jiro SEKIBA <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 87fwwvo3it.wl%[email protected]

#21 lore raw

Hi,

Quoted 33 lines · Jiro SEKIBA

Hi,

At Sat, 18 Sep 2010 01:20:00 +0900 (JST),

Quoted 18 lines · Ryusuke Konishi

Hi,

Quoted 11 lines · Jiro SEKIBA

Hi,

I think it would be good to have a generic libraries for other user land tools, like parted, for the purpose to modify/tweek file system off line. At least, resize/fsck/mkfs are the generic functionalities that parted can handle. So it's good if there is a library that can perform those things to avoid implementing same thing all over the place.

One big problem for parted is that parted is GPL3 and libnilfs2 is GPL2 X). Still, contributers of libnilfs2 are countable, so maybe we can get agreements from all contributers to change licence to LGPL2, isn't it?

Definitely yes. I think we should migrate the licence of the library to LGPL2.

Quoted 6 lines

One practical problem is that some of the source files derive the kernel code, and they are licensed under GPLv2.

For example, nilfs2_fs.h and crc32.c are just such ones.

Do you think we need replacement for these?

We could choose to change the licence as LGPL like mqueue.h (*1). However, we may be able to think that license of nilfs2_fs.h won't affect license of user land tools.

Quoted 6 lines

At least, Linus stated that "There's a
clarification that user-space programs that use the standard system call interfaces aren't considered derived works, ..." (*2).

*1) http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=include/linux/mqueue.h;hb=HEAD
*2) http://kerneltrap.org/node/1735

"unistd.h" is distributed under LGPL. So, the above Linus' statement sounds like saying just fundamental charateristics of LGPL.

The point of "nilfs2_fs.h" issue differs from that. A copy of nilfs2_fs.h is actually included in nilfs-utils, and the nilfs library is depending on the copy.

The "mqueue.h" solution seems to be an approved manner (sigh).

Another solution is extracting requisites from "nilfs2_fs.h" and rewriting them under LGPL for the library and userland programs.

Or, do you know any examples of GPL header file whose library is licensed under LGPL?

Quoted 2 lines

While, crc32.c must be replaced other implementation :(. I'll search lgpled implementation.

OK, let's replace it with a compatible one if we change the library license to LGPL.

Thanks,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#23 lore raw

Hi,

Based on the situation I've searched for a few days,
I conclude that it's better to change license of the nilfs2_fs.h header. I'll comment it inline.

At Tue, 28 Sep 2010 01:01:38 +0900 (JST),

Quoted 40 lines · Ryusuke Konishi

Hi,

Quoted 37 lines · Jiro SEKIBA

Hi,

At Sat, 18 Sep 2010 01:20:00 +0900 (JST),

Quoted 18 lines · Ryusuke Konishi

Hi,

Quoted 11 lines · Jiro SEKIBA

Hi,

I think it would be good to have a generic libraries for other user land tools, like parted, for the purpose to modify/tweek file system off line. At least, resize/fsck/mkfs are the generic functionalities that parted can handle. So it's good if there is a library that can perform those things to avoid implementing same thing all over the place.

One big problem for parted is that parted is GPL3 and libnilfs2 is GPL2 X). Still, contributers of libnilfs2 are countable, so maybe we can get agreements from all contributers to change licence to LGPL2, isn't it?

Definitely yes. I think we should migrate the licence of the library to LGPL2.

Quoted 6 lines

One practical problem is that some of the source files derive the kernel code, and they are licensed under GPLv2.

For example, nilfs2_fs.h and crc32.c are just such ones.

Do you think we need replacement for these?

We could choose to change the licence as LGPL like mqueue.h (*1). However, we may be able to think that license of nilfs2_fs.h won't affect license of user land tools.

At least, Linus stated that "There's a
clarification that user-space programs that use the standard system call interfaces aren't considered derived works, ..." (*2).

Quoted 5 lines
Quoted 2 lines

*1) http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=include/linux/mqueue.h;hb=HEAD
*2) http://kerneltrap.org/node/1735

"unistd.h" is distributed under LGPL. So, the above Linus' statement sounds like saying just fundamental charateristics of LGPL.

I interpreted his statement different way, that using standard interface of kernel is using system call or ioctl. Using those functionality requires including headers for binary compatibility.

Quoted 11 lines

The point of "nilfs2_fs.h" issue differs from that. A copy of nilfs2_fs.h is actually included in nilfs-utils, and the nilfs library is depending on the copy.

The "mqueue.h" solution seems to be an approved manner (sigh).

Another solution is extracting requisites from "nilfs2_fs.h" and rewriting them under LGPL for the library and userland programs.

Or, do you know any examples of GPL header file whose library is licensed under LGPL?

libv4l includes videodev2.h which is GPL, but is released under LGPL.
http://freshmeat.net/projects/libv4l

However, that is the only LGPL library I found which includes GPL header. Other libraries intentionally or unintentionally don't include GPL headers.

Actually, I realized that some of exported headers of linux kernel are not GPL, but like LGPL, BSD, MIT. Or even no license declaration.

Here is the diff of the kernel that merely changes license of header to avoid the license issues we have been talking.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=19b3eecc21b65a24b0aae2684ca0c8e1b99ef802

So non-GPLed header is common way to export linux headers.

thanks,

regards

Quoted 15 lines
Quoted 2 lines

While, crc32.c must be replaced other implementation :(. I'll search lgpled implementation.

OK, let's replace it with a compatible one if we change the library license to LGPL.

Thanks,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
Jiro SEKIBA <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 87wrq2tufd.wl%[email protected]

#25 lore raw
Quoted 5 lines · Jiro SEKIBA

Hi,

Based on the situation I've searched for a few days,
I conclude that it's better to change license of the nilfs2_fs.h header. I'll comment it inline.

OK, I'll post the patch to change the license, and will send it for the next merge window unless there are objections.

Thanks,
Ryusuke Konishi

Quoted 89 lines

At Tue, 28 Sep 2010 01:01:38 +0900 (JST),

Quoted 40 lines · Ryusuke Konishi

Hi,

Quoted 37 lines · Jiro SEKIBA

Hi,

At Sat, 18 Sep 2010 01:20:00 +0900 (JST),

Quoted 18 lines · Ryusuke Konishi

Hi,

Quoted 11 lines · Jiro SEKIBA

Hi,

I think it would be good to have a generic libraries for other user land tools, like parted, for the purpose to modify/tweek file system off line. At least, resize/fsck/mkfs are the generic functionalities that parted can handle. So it's good if there is a library that can perform those things to avoid implementing same thing all over the place.

One big problem for parted is that parted is GPL3 and libnilfs2 is GPL2 X). Still, contributers of libnilfs2 are countable, so maybe we can get agreements from all contributers to change licence to LGPL2, isn't it?

Definitely yes. I think we should migrate the licence of the library to LGPL2.

Quoted 6 lines

One practical problem is that some of the source files derive the kernel code, and they are licensed under GPLv2.

For example, nilfs2_fs.h and crc32.c are just such ones.

Do you think we need replacement for these?

We could choose to change the licence as LGPL like mqueue.h (*1). However, we may be able to think that license of nilfs2_fs.h won't affect license of user land tools.

At least, Linus stated that "There's a
clarification that user-space programs that use the standard system call interfaces aren't considered derived works, ..." (*2).

Quoted 5 lines
Quoted 2 lines

*1) http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=include/linux/mqueue.h;hb=HEAD
*2) http://kerneltrap.org/node/1735

"unistd.h" is distributed under LGPL. So, the above Linus' statement sounds like saying just fundamental charateristics of LGPL.

I interpreted his statement different way, that using standard interface of kernel is using system call or ioctl. Using those functionality requires including headers for binary compatibility.

Quoted 11 lines

The point of "nilfs2_fs.h" issue differs from that. A copy of nilfs2_fs.h is actually included in nilfs-utils, and the nilfs library is depending on the copy.

The "mqueue.h" solution seems to be an approved manner (sigh).

Another solution is extracting requisites from "nilfs2_fs.h" and rewriting them under LGPL for the library and userland programs.

Or, do you know any examples of GPL header file whose library is licensed under LGPL?

libv4l includes videodev2.h which is GPL, but is released under LGPL.
http://freshmeat.net/projects/libv4l

However, that is the only LGPL library I found which includes GPL header. Other libraries intentionally or unintentionally don't include GPL headers.

Actually, I realized that some of exported headers of linux kernel are not GPL, but like LGPL, BSD, MIT. Or even no license declaration.

Here is the diff of the kernel that merely changes license of header to avoid the license issues we have been talking.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=19b3eecc21b65a24b0aae2684ca0c8e1b99ef802

So non-GPLed header is common way to export linux headers.

thanks,

regards

Quoted 6 lines
Quoted 2 lines

While, crc32.c must be replaced other implementation :(. I'll search lgpled implementation.

OK, let's replace it with a compatible one if we change the library license to LGPL.

Quoted 13 lines
Quoted 9 lines

Thanks,
Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Jiro SEKIBA <[email protected]>

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html