J. Bruce Fields | 1 Jun 02:56 2012

Re: nfsd changes for 3.5

On Thu, May 31, 2012 at 03:14:57PM -0700, Linus Torvalds wrote:
> On Thu, May 31, 2012 at 1:53 PM, J. Bruce Fields <bfields <at> fieldses.org> wrote:
> > On Thu, May 31, 2012 at 01:17:26PM -0700, Linus Torvalds wrote:
> >
> > Uh, that means ditching some work in my public git tree.  Which I
> > haven't rebased in years.  So, a stupid process question; would you
> > rather I:
> >
> >        - continue to be strict about rebasing and apply a bunch of
> >          reverts?
> >        - ditch it and start over?
> 
> I think in this case rebasing is the right thing to do.
> 
> I hate rebasing, but what I hate about it is how people who use it as
> a development model cause problems for anybody else. I don't think it
> will cause problems in this particular case, but if somebody hollers,
> let me know.

OK, will do.

For now, would you mind pulling this?:

	git://linux-nfs.org/~bfields/linux.git for-3.5-take-2

It's literally just the previous tree cut off before the delegation
stuff--so it's been in -next for a month, etc.

--b.

(Continue reading)

Picon

[PATCH] Support HFS+ not filling its device completely

Hello, all. My HFS+ previously was on slightly smaller partition
and was subsequently dd'ed to its current location. Mac OS X doesn't
mind and I don't mind losing a little space. However Linux fails to
locate second superblock and hence to mount it. This patch uses
the size field from the first superblock to locate the second.

Signed-off-by: Vladimir Serbinenko <phcoder <at> gmail.com>
---
 fs/hfsplus/wrapper.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 7daf4b8..a7e1268 100644
--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
 <at>  <at>  -206,6 +206,9  <at>  <at>  reread:
 		set_bit(HFSPLUS_SB_HFSX, &sbi->flags);
 		/*FALLTHRU*/
 	case cpu_to_be16(HFSPLUS_VOLHEAD_SIG):
+		part_size = (((u64) be32_to_cpu(sbi->s_vhdr->blocksize)
+			      * (u64) be32_to_cpu(sbi->s_vhdr->total_blocks))
+			     >> HFSPLUS_SECTOR_SHIFT);
 		break;
 	case cpu_to_be16(HFSP_WRAP_MAGIC):
 		if (!hfsplus_read_mdb(sbi->s_vhdr, &wd))
-- 
1.7.10

--

-- 
Regards
(Continue reading)

Picon

[PATCH 4/4] Support non-BMP characters on UDF

Replace UCS-2 with proper UTF-16.
Signed-off-by: Vladimir Serbinenko <phcoder <at> gmail.com>
---
 fs/udf/unicode.c |   35 +++++++++++++++++++++++++++--------
 1 file changed, 27 insertions(+), 8 deletions(-)

diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c
index 7df644d..0d1c93c 100644
--- a/fs/udf/unicode.c
+++ b/fs/udf/unicode.c
 <at>  <at>  -106,9 +106,20  <at>  <at>  int udf_CS0toNLS(struct nls_table *nls, struct ustr *utf_o,
 	utf_o->u_len = 0;
 	for (i = 0; (i < ocu_len) && (utf_o->u_len <= (UDF_NAME_LEN - 3));) {
 		/* Expand OSTA compressed Unicode to Unicode */
-		uint32_t c = ocu[i++];
-		if (cmp_id == 16)
-			c = (c << 8) | ocu[i++];
+		unicode_t c;
+		if (cmp_id == 8)
+			c = ocu[i++];
+		else {
+			int s = utf16s_to_unicode((u16 *) (ocu + i),
+						  (ocu_len - i) / 2,
+						  UTF16_BIG_ENDIAN_UNALIGNED,
+						  &c);
+			if (s <= 0) {
+				c = (ocu[i] << 8) | ocu[i+1];
+				s = 1;
+			}
+			i += 2 * s;
(Continue reading)

Picon

[PATCH 2/4] Add unaligned UTF-16 access

Used for reading and writing UTF-16 on UDF and Joliet.

Signed-off-by: Vladimir Serbinenko <phcoder <at> gmail.com>
---
 fs/nls/nls_base.c   |   31 +++++++++++++++++++++----------
 include/linux/nls.h |    4 +++-
 2 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
index 0c1ad5b..e941a80 100644
--- a/fs/nls/nls_base.c
+++ b/fs/nls/nls_base.c
 <at>  <at>  -16,6 +16,7  <at>  <at> 
 #include <linux/kmod.h>
 #include <linux/spinlock.h>
 #include <asm/byteorder.h>
+#include <asm/unaligned.h>

 static struct nls_table default_table;
 static struct nls_table *tables = &default_table;
 <at>  <at>  -114,7 +115,7  <at>  <at>  int utf32_to_utf8(unicode_t u, u8 *s, int maxout)
 }
 EXPORT_SYMBOL(utf32_to_utf8);

-static inline void put_utf16(wchar_t *s, unsigned c, enum utf16_endian endian)
+static inline void put_utf16(u16 *s, unsigned c, enum utf16_endian endian)
 {
 	switch (endian) {
 	default:
 <at>  <at>  -126,11 +127,17  <at>  <at>  static inline void put_utf16(wchar_t *s, unsigned c, enum utf16_endian endian)
(Continue reading)

Picon

[PATCH 1/4] Add UTF-16 convenience functions

This is used for UDF and some other FS non-BMP support.
This series requires my previously sent
[PATCH 1/8] Support full unicode in uni2char and char2uni
Can resend if needed.

Signed-off-by: Vladimir Serbinenko <phcoder <at> gmail.com>
---
 fs/nls/nls_base.c   |   63 +++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/nls/nls_utf8.c   |    2 +-
 include/linux/nls.h |    6 +++++
 3 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
index 4f6d1ae..0c1ad5b 100644
--- a/fs/nls/nls_base.c
+++ b/fs/nls/nls_base.c
 <at>  <at>  -171,6 +171,32  <at>  <at>  int utf8s_to_utf16s(const u8 *s, int inlen, enum utf16_endian endian,
 }
 EXPORT_SYMBOL(utf8s_to_utf16s);

+int unicode_to_utf16s(unicode_t u, enum utf16_endian endian,
+		      wchar_t *pwcs, int maxout)
+{
+	u16 *op = pwcs;
+
+	op = pwcs;
+
+	if (u >= PLANE_SIZE) {
+		if (maxout < 2)
+			return -1;
(Continue reading)

Picon

[PATCH 3/4] Eliminate UDF duplication

I don't insist on this one as I find dedicated UTF-8-UTF-16 neater,
simple, easier to understand and faster. However it seems that for
maintenance and compatibility reasons it's preferable for it to go.
If you want to keep it I'll adjust my next patch.

Signed-off-by: Vladimir Serbinenko <phcoder <at> gmail.com>
---
 fs/udf/Kconfig   |    5 --
 fs/udf/super.c   |   47 +++++--------
 fs/udf/udf_sb.h  |    2 -
 fs/udf/udfdecl.h |    3 +-
 fs/udf/unicode.c |  206 +++---------------------------------------------------
 5 files changed, 28 insertions(+), 235 deletions(-)

diff --git a/fs/udf/Kconfig b/fs/udf/Kconfig
index 0e0e99b..bbc8e60 100644
--- a/fs/udf/Kconfig
+++ b/fs/udf/Kconfig
 <at>  <at>  -11,8 +11,3  <at>  <at>  config UDF_FS
 	  module will be called udf.

 	  If unsure, say N.
-
-config UDF_NLS
-	bool
-	default y
-	depends on (UDF_FS=m && NLS) || (UDF_FS=y && NLS=y)
diff --git a/fs/udf/super.c b/fs/udf/super.c
index ac8a348..e165142 100644
--- a/fs/udf/super.c
(Continue reading)

majianpeng | 1 Jun 03:15 2012
Picon

Re: Re: [PATCH] export kernel call set_task_comm()

On Thu, 31 May 2012 17:00:54 +0100 , viro wrote:
>On Thu, May 31, 2012 at 03:16:18PM +0800, majianpeng wrote:
>> In Commit 7d74f492e4dd0034a61458eb80f70b1d2862ed07,author said:
>> "This allows drivers who call this function to be compiled modularly.
>> Otherwise, a driver who is interested in this type of functionality
>> has to implement their own get_task_comm() call, causing code
>> duplication in the Linux source tree."
>> 
>> But author did not say about set_task_comm().At present,I used it but
>> compiled error.To the same purpose, it should export.

>Are you doing that to preexisting process?  Or just to a kernel thread
>you are creating?  In the latter case, you really ought to use
>kthread_create() instead of bare-metal kernel_thread()...

Yes, I am doing that to preexisting process and in module.So I think it should export.

------------------				 
majianpeng
2012-06-01

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Al Viro | 1 Jun 03:24 2012
Picon

Re: Re: [PATCH] export kernel call set_task_comm()

On Fri, Jun 01, 2012 at 09:11:32AM +0800, majianpeng wrote:
> On Thu, 31 May 2012 17:00:54 +0100 , viro wrote:
> >On Thu, May 31, 2012 at 03:16:18PM +0800, majianpeng wrote:
> >> In Commit 7d74f492e4dd0034a61458eb80f70b1d2862ed07,author said:
> >> "This allows drivers who call this function to be compiled modularly.
> >> Otherwise, a driver who is interested in this type of functionality
> >> has to implement their own get_task_comm() call, causing code
> >> duplication in the Linux source tree."
> >> 
> >> But author did not say about set_task_comm().At present,I used it but
> >> compiled error.To the same purpose, it should export.
> 
> >Are you doing that to preexisting process?  Or just to a kernel thread
> >you are creating?  In the latter case, you really ought to use
> >kthread_create() instead of bare-metal kernel_thread()...
> 
> Yes, I am doing that to preexisting process and in module.So I think it should export.

Why is that module playing with ->comm[] of process it hadn't spawned?
Note that _reading_ ->comm[] has fairly mundane uses - debugging printks
and all such.   Changing it, OTOH...

Details, please; "my module calls that, so it should be exported" is not enough.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

majianpeng | 1 Jun 04:13 2012
Picon

Re: Re: [PATCH] export kernel call set_task_comm()

On Thu, 31 May 2012 18:24:47 -0700, viro wrote:
>On Fri, Jun 01, 2012 at 09:11:32AM +0800, majianpeng wrote:
>> On Thu, 31 May 2012 17:00:54 +0100 , viro wrote:
>> >On Thu, May 31, 2012 at 03:16:18PM +0800, majianpeng wrote:
>> >> In Commit 7d74f492e4dd0034a61458eb80f70b1d2862ed07,author said:
>> >> "This allows drivers who call this function to be compiled modularly.
>> >> Otherwise, a driver who is interested in this type of functionality
>> >> has to implement their own get_task_comm() call, causing code
>> >> duplication in the Linux source tree."
>> >> 
>> >> But author did not say about set_task_comm().At present,I used it but
>> >> compiled error.To the same purpose, it should export.
>> 
>> >Are you doing that to preexisting process?  Or just to a kernel thread
>> >you are creating?  In the latter case, you really ought to use
>> >kthread_create() instead of bare-metal kernel_thread()...
>> 
>> Yes, I am doing that to preexisting process and in module.So I think it should export.
>
>Why is that module playing with ->comm[] of process it hadn't spawned?
>Note that _reading_ ->comm[] has fairly mundane uses - debugging printks
>and all such.   Changing it, OTOH...
>
>Details, please; "my module calls that, so it should be exported" is not enough.
This module is md.
It created a thread with kthread_run.But the name is wrong because using some old information.
Because it has mode places like this, so I thought to change the name at run-place .
If so, I can modify the ->comm[] directly?


(Continue reading)

Ted Ts'o | 1 Jun 06:17 2012
Picon
Picon

Re: [PATCH] ext4: hole-punch use truncate_pagecache_range

On Sun, May 13, 2012 at 01:47:00PM -0700, Hugh Dickins wrote:
> When truncating a file, we unmap pages from userspace first, as that's
> usually more efficient than relying, page by page, on the fallback in
> truncate_inode_page() - particularly if the file is mapped many times.
> 
> Do the same when punching a hole: 3.4 added truncate_pagecache_range()
> to do the unmap and trunc, so use it in ext4_ext_punch_hole(), instead
> of calling truncate_inode_pages_range() directly.
> 
> Signed-off-by: Hugh Dickins <hughd <at> google.com>

Applied, thanks.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane