2008-11-28 10:36:49

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: Tree for November 28

Hi all,

Changes since 20081127:

Today's tree fails the powerpc allyesconfig build.

New tree:
trivial

Undropped trees:

Dropped trees (temporarily):
v4l-dvb (build problem)
kbuild (build problem)
semaphore-removal (due to unfixed conflicts against Linus' tree)
cpu_alloc (build problem)
perfmon3 (concerns from the x86 team)

The net tree lost its 3 conflicts and a merge fix, but gained a build
failure.

The firmware tree gained 2 conflicts against the net tree.

The sound tree gained a build failure.

----------------------------------------------------------------------------

I have created today's linux-next tree at
git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git
(patches at
http://www.kernel.org/pub/linux/kernel/people/sfr/linux-next/). If you
are tracking the linux-next tree using git, you should not use "git pull"
to do so as that will try to merge the new linux-next release with the
old one. You should use "git fetch" as mentioned in the FAQ on the wiki
(see below).

You can see which trees have been included by looking in the Next/Trees
file in the source. There are also quilt-import.log and merge.log files
in the Next directory. Between each merge, the tree was built with
a ppc64_defconfig for powerpc and an allmodconfig for x86_64. After the
final fixups (if any), it is also built with powerpc allnoconfig,
44x_defconfig and allyesconfig and i386, sparc and sparc64 defconfig.

Below is a summary of the state of the merge.

We are up to 127 trees (counting Linus' and 15 trees of patches pending for
Linus' tree), more are welcome (even if they are currently empty).
Thanks to those who have contributed, and to those who haven't, please do.

Status of my local build tests will be at
http://kisskb.ellerman.id.au/linux-next . If maintainers want to give
advice about cross compilers/configs that work, we are always open to add
more builds.

Thanks to Jan Dittmer for adding the linux-next tree to his build tests
at http://l4x.org/k/ , the guys at http://test.kernel.org/ and Randy
Dunlap for doing many randconfig builds.

There is a wiki covering stuff to do with linux-next at
http://linux.f-seidel.de/linux-next/pmwiki/ . Thanks to Frank Seidel.

--
Cheers,
Stephen Rothwell [email protected]

$ git checkout master
$ git reset --hard stable
Merging origin/master
Merging arm-current/master
Merging m68k-current/for-linus
Merging powerpc-merge/merge
Merging sparc-current/master
Merging scsi-rc-fixes/master
Merging net-current/master
Merging sound-current/for-linus
Merging pci-current/for-linus
Merging wireless-current/master
Merging kbuild-current/master
Merging quilt/driver-core.current
Merging quilt/usb.current
Merging cpufreq-current/fixes
Merging input-current/for-linus
Merging md-current/for-2.6.26
Merging dwmw2/master
Merging arm/devel
Merging avr32/avr32-arch
Merging blackfin/for-linus
Merging cris/for-next
Merging ia64/test
Merging m68k/for-next
Merging m68knommu/for-next
Merging mips/mips-for-linux-next
Merging parisc/master
Merging powerpc/next
Merging 4xx/next
CONFLICT (content): Merge conflict in arch/powerpc/configs/ppc44x_defconfig
Merging galak/next
Merging pxa/for-next
Merging s390/features
CONFLICT (content): Merge conflict in drivers/char/Makefile
Merging sh/master
Merging sparc/master
Merging x86/auto-x86-next
Merging xtensa/master
Merging quilt/driver-core
Merging quilt/usb
Merging tip-core/auto-core-next
Merging cpus4096/auto-cpus4096-next
Merging ftrace/auto-ftrace-next
CONFLICT (content): Merge conflict in scripts/recordmcount.pl
Merging genirq/auto-genirq-next
Merging safe-poison-pointers/auto-safe-poison-pointers-next
Merging sched/auto-sched-next
Merging stackprotector/auto-stackprotector-next
Merging timers/auto-timers-next
Merging pci/linux-next
Merging quilt/device-mapper
Merging hid/for-next
Merging quilt/i2c
Merging quilt/jdelvare-hwmon
Merging quilt/kernel-doc
Merging jfs/next
Merging quilt/ide
Merging libata/NEXT
Merging nfs/linux-next
Merging xfs/master
Merging infiniband/for-next
Merging acpi/test
Merging nfsd/nfsd-next
Merging ieee1394/for-next
Merging ubi/linux-next
Merging kvm/master
CONFLICT (content): Merge conflict in arch/x86/kernel/reboot.c
Merging dlm/next
Merging scsi/master
Merging ocfs2/linux-next
Merging ext4/next
Merging async_tx/next
Merging udf/for_next
Merging net/master
Applying net: async_tx merge fix
Applying net: decnet build fix
Merging mtd/master
CONFLICT (content): Merge conflict in drivers/mtd/maps/physmap.c
Merging wireless/master
Merging crypto/master
Merging vfs/for-next
Merging sound/for-next
Merging cpufreq/next
Merging v9fs/for-next
Merging quilt/rr
CONFLICT (content): Merge conflict in arch/x86/kernel/io_apic.c
CONFLICT (content): Merge conflict in arch/x86/kernel/setup.c
CONFLICT (content): Merge conflict in kernel/irq/manage.c
CONFLICT (content): Merge conflict in kernel/irq/proc.c
Merging cifs/master
Merging mmc/next
Merging gfs2/master
Merging input/next
Merging semaphore/semaphore
Merging bkl-removal/bkl-removal
Merging ubifs/linux-next
Merging lsm/for-next
Merging block/for-next
Merging embedded/master
Merging firmware/master
CONFLICT (content): Merge conflict in drivers/net/tg3.c
CONFLICT (content): Merge conflict in firmware/Makefile
CONFLICT (content): Merge conflict in firmware/WHENCE
Merging pcmcia/master
Merging battery/master
Merging leds/for-mm
Merging backlight/for-mm
Merging kgdb/kgdb-next
Merging slab/for-next
Merging uclinux/for-next
Merging md/for-next
Merging kmemcheck/auto-kmemcheck-next
CONFLICT (content): Merge conflict in MAINTAINERS
CONFLICT (content): Merge conflict in arch/x86/mm/Makefile
CONFLICT (content): Merge conflict in mm/slab.c
CONFLICT (content): Merge conflict in mm/slub.c
Merging generic-ipi/auto-generic-ipi-next
Merging mfd/for-next
Merging hdlc/hdlc-next
Merging drm/drm-next
Merging voltage/for-next
Merging security-testing/next
CONFLICT (content): Merge conflict in fs/nfsd/nfs4recover.c
CONFLICT (content): Merge conflict in fs/ocfs2/namei.c
CONFLICT (content): Merge conflict in fs/xfs/linux-2.6/xfs_cred.h
CONFLICT (content): Merge conflict in fs/xfs/linux-2.6/xfs_globals.h
CONFLICT (content): Merge conflict in fs/xfs/xfs_vnodeops.h
Merging lblnet/master
Merging quilt/ttydev
CONFLICT (content): Merge conflict in fs/devpts/inode.c
Merging agp/agp-next
Merging oprofile/auto-oprofile-next
Merging fastboot/auto-fastboot-next
Merging sparseirq/auto-sparseirq-next
Merging iommu/auto-iommu-next
Merging uwb/for-upstream
Merging watchdog/master
Merging proc/proc
CONFLICT (content): Merge conflict in fs/proc/base.c
CONFLICT (content): Merge conflict in kernel/exit.c
Merging bdev/master
Merging dwmw2-iommu/master
Merging cputime/cputime
CONFLICT (content): Merge conflict in kernel/sched.c
Merging osd/linux-next
Merging fatfs/master
Merging fuse/for-next
Merging trivial/for-next
Merging quilt/staging
Merging scsi-post-merge/master
Created commit 16b3b1d: Revert "ALSA: hda - Move power_save option to hda_intel.c"


Attachments:
(No filename) (6.82 kB)
(No filename) (197.00 B)
Download all attachments

2008-11-28 15:14:12

by Alexey Dobriyan

[permalink] [raw]
Subject: next-2008-11-28: bfin vs cpumask fixlet

--- a/arch/blackfin/kernel/time-ts.c
+++ b/arch/blackfin/kernel/time-ts.c
@@ -162,7 +162,6 @@ static struct clock_event_device clockevent_bfin = {
.name = "bfin_core_timer",
.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
.shift = 32,
- .cpumask = CPU_MASK_CPU0,
.set_next_event = bfin_timer_set_next_event,
.set_mode = bfin_timer_set_mode,
};
@@ -193,6 +192,7 @@ static int __init bfin_clockevent_init(void)
clockevent_bfin.mult = div_sc(timer_clk, NSEC_PER_SEC, clockevent_bfin.shift);
clockevent_bfin.max_delta_ns = clockevent_delta2ns(-1, &clockevent_bfin);
clockevent_bfin.min_delta_ns = clockevent_delta2ns(100, &clockevent_bfin);
+ clockevent_bfin.cpumask = cpumask_of(0);
clockevents_register_device(&clockevent_bfin);

return 0;

2008-11-28 17:55:32

by Randy Dunlap

[permalink] [raw]
Subject: Re: linux-next: Tree for November 28 (misc/tc1100)

Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20081127:
>
> Today's tree fails the powerpc allyesconfig build.
>
> New tree:
> trivial
>
> Undropped trees:
>
> Dropped trees (temporarily):
> v4l-dvb (build problem)
> kbuild (build problem)
> semaphore-removal (due to unfixed conflicts against Linus' tree)
> cpu_alloc (build problem)
> perfmon3 (concerns from the x86 team)

make[2]: *** No rule to make target `drivers/misc/tc1100-wmi.o', needed by `drivers/misc/built-in.o'.

on allmodconfig & allyesconfig for i386.

On, moved to drivers/x86/. Someone needs to clean up drivers/misc/Makefile.

--
~Randy

2008-11-28 21:36:21

by Stephen Rothwell

[permalink] [raw]
Subject: drivers/x86 (Was: Re: linux-next: Tree for November 28 (misc/tc1100))

Hi Len,

On Fri, 28 Nov 2008 09:55:08 -0800 Randy Dunlap <[email protected]> wrote:
>
> make[2]: *** No rule to make target `drivers/misc/tc1100-wmi.o', needed by `drivers/misc/built-in.o'.
>
> on allmodconfig & allyesconfig for i386.
>
> On, moved to drivers/x86/. Someone needs to clean up drivers/misc/Makefile.

Just wondering where the move to drivers/x86 was discussed, (reviewed and
tested) and why the change is in the acpi tree and not the x86 tree?

I am not saying it should not be done (I haven't looked enough to have an
opinion).
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (656.00 B)
(No filename) (197.00 B)
Download all attachments

2008-11-28 21:51:23

by Len Brown

[permalink] [raw]
Subject: Re: drivers/x86 (Was: Re: linux-next: Tree for November 28 (misc/tc1100))



On Sat, 29 Nov 2008, Stephen Rothwell wrote:

> > On, moved to drivers/x86/. Someone needs to clean up drivers/misc/Makefile.
>
> Just wondering where the move to drivers/x86 was discussed, (reviewed and
> tested) and why the change is in the acpi tree and not the x86 tree?
>
> I am not saying it should not be done (I haven't looked enough to have an
> opinion).

Although I discussed it with Linus last week in Portland,
it is true that this patch erroneously appeared
in my tree before being sent to the list.

I guess I got interrupted...
I'll send it now, thanks for the note.

-Len

2008-11-29 09:34:44

by Ingo Molnar

[permalink] [raw]
Subject: Re: drivers/x86 (Was: Re: linux-next: Tree for November 28 (misc/tc1100))


* Stephen Rothwell <[email protected]> wrote:

> Hi Len,
>
> On Fri, 28 Nov 2008 09:55:08 -0800 Randy Dunlap <[email protected]> wrote:
> >
> > make[2]: *** No rule to make target `drivers/misc/tc1100-wmi.o', needed by `drivers/misc/built-in.o'.
> >
> > on allmodconfig & allyesconfig for i386.
> >
> > On, moved to drivers/x86/. Someone needs to clean up drivers/misc/Makefile.
>
> Just wondering where the move to drivers/x86 was discussed, (reviewed
> and tested) and why the change is in the acpi tree and not the x86
> tree?

it will all conflict with pending bits in the x86 tree, so i'd prefer if
Len did this atomically after 2.6.29-rc1, without it having this
long-term breakage effect.

Historically drivers/misc/ has been more active via the ACPI tree. (Len
being the (in-)voluntary maintainer for those platform details)

So drivers/x86/ makes sense i guess. Eventually the really lowlevel bits
might move to arch/x86/drivers/ or so - but i've got no strong opinion on
it. There seems to be enough precedent of existing drivers/$ARCH
hierarchies.

Ingo

2008-11-30 23:44:20

by Laurent Riffard

[permalink] [raw]
Subject: next-2008-11-28 : can't mount UDF DVD

Hi,

With next-2008-11-28, I was unable to mount an UDF-formatted DVD-RW:

~$ mount -oro -t udf /dev/sr0 /media/cdrom/
mount: Not a directory

There was no problem with 2.6.28-rc6.

I made a bisection:

33284bdf40f88160a154202510b27d983138c805 is first bad commit
commit 33284bdf40f88160a154202510b27d983138c805
Author: Marcin Slusarz <[email protected]>
Date: Sun Nov 16 20:52:19 2008 +0100

udf: implement mode and dmode mounting options

"dmode" allows overriding permissions of directories and
"mode" allows overriding permissions of files.

Signed-off-by: Marcin Slusarz <[email protected]>
Cc: Jan Kara <[email protected]>
Signed-off-by: Jan Kara <[email protected]>


Indeed, with this commit, I *must* use the dmode option to mount my DVD:

~$ sudo mount -oro,dmode=0755 -t udf /dev/sr0 /media/cdrom/
~$ grep /media/cdrom /proc/mounts
/dev/scd0 /media/cdrom udf ro,mode=177777,dmode=755,utf8 0 0
~$ ls -la /media/cdrom/
total 46
drwxr-xr-x 5 root root 344 Dec 24 2007 .
drwxr-xr-x 12 root root 4096 Dec 1 00:17 ..
drwxr-xr-x 2 laurent laurent 7112 Nov 30 20:14 flexbackup
drwxr-xr-x 2 root root 40 Nov 20 2005 lost+found
drwxr-xr-x 10 laurent laurent 4548 Nov 25 2005 patches
~$ ls -la /media/cdrom/flexbackup/
total 4307946
drwxr-xr-x 2 laurent laurent 7112 Nov 30 20:14 .
drwxr-xr-x 5 root root 344 Dec 24 2007 ..
?rwsrwsrwt 1 laurent laurent 44 Oct 1 2006 00-index-key
...

Althought I was able to mount it with no special option on 2.6.28-rc6:

~$ sudo mount -oro -t udf /dev/sr0 /media/cdrom/
~$ grep /media/cdrom /proc/mounts
/dev/scd0 /media/cdrom udf ro,utf8 0 0
~$ ls -la /media/cdrom/
total 46
drwxrwxrwx 5 root root 344 2007-12-24 18:09 .
drwxr-xr-x 12 root root 4096 2008-12-01 00:22 ..
drwxr-x--- 2 laurent laurent 7112 2008-11-30 20:14 flexbackup
drwxr-xr-x 2 root root 40 2005-11-20 23:37 lost+found
drwxr-x--- 10 laurent laurent 4548 2005-11-25 18:18 patches
~$ ls -la /media/cdrom/flexbackup/
total 4307946
drwxr-x--- 2 laurent laurent 7112 2008-11-30 20:14 .
drwxrwxrwx 5 root root 344 2007-12-24 18:09 ..
-rw-r----- 1 laurent laurent 44 2006-10-01 15:36 00-index-key
...

~~
laurent

2008-12-01 00:19:22

by Marcin Slusarz

[permalink] [raw]
Subject: Re: next-2008-11-28 : can't mount UDF DVD

On Mon, Dec 01, 2008 at 12:44:05AM +0100, Laurent Riffard wrote:
> Hi,
>
> With next-2008-11-28, I was unable to mount an UDF-formatted DVD-RW:
>
> ~$ mount -oro -t udf /dev/sr0 /media/cdrom/
> mount: Not a directory
>
> There was no problem with 2.6.28-rc6.
>
> I made a bisection:
>
> 33284bdf40f88160a154202510b27d983138c805 is first bad commit
> commit 33284bdf40f88160a154202510b27d983138c805
> Author: Marcin Slusarz <[email protected]>
> Date: Sun Nov 16 20:52:19 2008 +0100
>
> udf: implement mode and dmode mounting options
>
> "dmode" allows overriding permissions of directories and
> "mode" allows overriding permissions of files.
>
> Signed-off-by: Marcin Slusarz <[email protected]>
> Cc: Jan Kara <[email protected]>
> Signed-off-by: Jan Kara <[email protected]>
>
>
> Indeed, with this commit, I *must* use the dmode option to mount my DVD:

That's not intended behaviour... ;)

> ~$ sudo mount -oro,dmode=0755 -t udf /dev/sr0 /media/cdrom/
> ~$ grep /media/cdrom /proc/mounts
> /dev/scd0 /media/cdrom udf ro,mode=177777,dmode=755,utf8 0 0
^^^^^^
funny (it's 65535 / (u16)-1)

> ~$ ls -la /media/cdrom/
> total 46
> drwxr-xr-x 5 root root 344 Dec 24 2007 .
> drwxr-xr-x 12 root root 4096 Dec 1 00:17 ..
> drwxr-xr-x 2 laurent laurent 7112 Nov 30 20:14 flexbackup
> drwxr-xr-x 2 root root 40 Nov 20 2005 lost+found
> drwxr-xr-x 10 laurent laurent 4548 Nov 25 2005 patches
> ~$ ls -la /media/cdrom/flexbackup/
> total 4307946
> drwxr-xr-x 2 laurent laurent 7112 Nov 30 20:14 .
> drwxr-xr-x 5 root root 344 Dec 24 2007 ..
> ?rwsrwsrwt 1 laurent laurent 44 Oct 1 2006 00-index-key
> ...
>
> Althought I was able to mount it with no special option on 2.6.28-rc6:
>
> ~$ sudo mount -oro -t udf /dev/sr0 /media/cdrom/
> ~$ grep /media/cdrom /proc/mounts
> /dev/scd0 /media/cdrom udf ro,utf8 0 0
> ~$ ls -la /media/cdrom/
> total 46
> drwxrwxrwx 5 root root 344 2007-12-24 18:09 .
> drwxr-xr-x 12 root root 4096 2008-12-01 00:22 ..
> drwxr-x--- 2 laurent laurent 7112 2008-11-30 20:14 flexbackup
> drwxr-xr-x 2 root root 40 2005-11-20 23:37 lost+found
> drwxr-x--- 10 laurent laurent 4548 2005-11-25 18:18 patches
> ~$ ls -la /media/cdrom/flexbackup/
> total 4307946
> drwxr-x--- 2 laurent laurent 7112 2008-11-30 20:14 .
> drwxrwxrwx 5 root root 344 2007-12-24 18:09 ..
> -rw-r----- 1 laurent laurent 44 2006-10-01 15:36 00-index-key
> ...
>
> ~~
> laurent

Can you check whether attached patch fixes it?
What architecture are you testing on?

diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 6612a27..9eeb726 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1222,10 +1222,10 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
iinfo->i_lenExtents = inode->i_size;

if (fe->icbTag.fileType != ICBTAG_FILE_TYPE_DIRECTORY &&
- sbi->s_fmode != -1)
+ sbi->s_fmode != (mode_t)-1)
inode->i_mode = sbi->s_fmode;
else if (fe->icbTag.fileType == ICBTAG_FILE_TYPE_DIRECTORY &&
- sbi->s_dmode != -1)
+ sbi->s_dmode != (mode_t)-1)
inode->i_mode = sbi->s_dmode;
else
inode->i_mode = udf_convert_permissions(fe);
diff --git a/fs/udf/super.c b/fs/udf/super.c
index e5d121d..af8a771 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -284,9 +284,9 @@ static int udf_show_options(struct seq_file *seq, struct vfsmount *mnt)
seq_printf(seq, ",gid=%u", sbi->s_gid);
if (sbi->s_umask != 0)
seq_printf(seq, ",umask=%o", sbi->s_umask);
- if (sbi->s_fmode != -1)
+ if (sbi->s_fmode != (mode_t)-1)
seq_printf(seq, ",mode=%o", sbi->s_fmode);
- if (sbi->s_dmode != -1)
+ if (sbi->s_dmode != (mode_t)-1)
seq_printf(seq, ",dmode=%o", sbi->s_dmode);
if (UDF_QUERY_FLAG(sb, UDF_FLAG_SESSION_SET))
seq_printf(seq, ",session=%u", sbi->s_session);

2008-12-01 04:29:37

by Len Brown

[permalink] [raw]
Subject: Re: drivers/x86 (Was: Re: linux-next: Tree for November 28 (misc/tc1100))



On Sat, 29 Nov 2008, Ingo Molnar wrote:

>
> * Stephen Rothwell <[email protected]> wrote:
>
> > Hi Len,
> >
> > On Fri, 28 Nov 2008 09:55:08 -0800 Randy Dunlap <[email protected]> wrote:
> > >
> > > make[2]: *** No rule to make target `drivers/misc/tc1100-wmi.o', needed by `drivers/misc/built-in.o'.
> > >
> > > on allmodconfig & allyesconfig for i386.
> > >
> > > On, moved to drivers/x86/. Someone needs to clean up drivers/misc/Makefile.
> >
> > Just wondering where the move to drivers/x86 was discussed, (reviewed
> > and tested) and why the change is in the acpi tree and not the x86
> > tree?
>
> it will all conflict with pending bits in the x86 tree, so i'd prefer if
> Len did this atomically after 2.6.29-rc1, without it having this
> long-term breakage effect.

Is linux-next running into a conflict between x86 and the acpi
tree today?

thanks,
-Len

2008-12-01 04:48:18

by Rusty Russell

[permalink] [raw]
Subject: Re: next-2008-11-28: bfin vs cpumask fixlet

On Saturday 29 November 2008 01:47:55 Alexey Dobriyan wrote:
> --- a/arch/blackfin/kernel/time-ts.c
> +++ b/arch/blackfin/kernel/time-ts.c
> @@ -162,7 +162,6 @@ static struct clock_event_device clockevent_bfin = {
> .name = "bfin_core_timer",
> .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
> .shift = 32,
> - .cpumask = CPU_MASK_CPU0,

Thanks Alexey, applied.

I grepped harder, and this seems to be the last one.

Cheers,
Rusty.

2008-12-01 19:28:23

by Laurent Riffard

[permalink] [raw]
Subject: Re: next-2008-11-28 : can't mount UDF DVD

Le 01.12.2008 01:18, Marcin Slusarz a ?crit :
> On Mon, Dec 01, 2008 at 12:44:05AM +0100, Laurent Riffard wrote:
>> Hi,
>>
>> With next-2008-11-28, I was unable to mount an UDF-formatted DVD-RW:
>>
>> ~$ mount -oro -t udf /dev/sr0 /media/cdrom/
>> mount: Not a directory
>>
>> There was no problem with 2.6.28-rc6.
>>
>> I made a bisection:
>>
>> 33284bdf40f88160a154202510b27d983138c805 is first bad commit
>> commit 33284bdf40f88160a154202510b27d983138c805
>> Author: Marcin Slusarz <[email protected]>
>> Date: Sun Nov 16 20:52:19 2008 +0100
>>
>> udf: implement mode and dmode mounting options
>>
>> "dmode" allows overriding permissions of directories and
>> "mode" allows overriding permissions of files.
>>
>> Signed-off-by: Marcin Slusarz <[email protected]>
>> Cc: Jan Kara <[email protected]>
>> Signed-off-by: Jan Kara <[email protected]>
>>
>>
>> Indeed, with this commit, I *must* use the dmode option to mount my DVD:
>
> That's not intended behaviour... ;)
>
>> ~$ sudo mount -oro,dmode=0755 -t udf /dev/sr0 /media/cdrom/
>> ~$ grep /media/cdrom /proc/mounts
>> /dev/scd0 /media/cdrom udf ro,mode=177777,dmode=755,utf8 0 0
> ^^^^^^
> funny (it's 65535 / (u16)-1)
>
[snip]
>
> Can you check whether attached patch fixes it?
> What architecture are you testing on?

i686, 32-bit althought CPU is "AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ stepping 02".

~$ uname -a
Linux calimero 2.6.28-rc6-next-20081128-05108-g389b1c9 #62 SMP PREEMPT Mon Dec 1 19:53:55 CET 2008 i686 GNU/Linux

Current kernel is next-20081128 + reiser4 patches + your patch: it seems to works well now.

First test: mount with default options. It works as expected.

~$ sudo mount -oro -t udf /dev/sr0 /media/cdrom/
~$ grep /media/cdrom /proc/mounts
/dev/scd0 /media/cdrom udf ro,utf8 0 0
~$ ls -al /media/cdrom/
total 46
drwxrwxrwx 5 root root 344 2007-12-24 18:09 .
drwxr-xr-x 12 root root 4096 2008-12-01 20:04 ..
drwxr-x--- 2 laurent laurent 7112 2008-11-30 20:14 flexbackup
drwxr-xr-x 2 root root 40 2005-11-20 23:37 lost+found
drwxr-x--- 10 laurent laurent 4548 2005-11-25 18:18 patches
~$ ls -al /media/cdrom/flexbackup/
total 4307946
drwxr-x--- 2 laurent laurent 7112 2008-11-30 20:14 .
drwxrwxrwx 5 root root 344 2007-12-24 18:09 ..
-rw-r----- 1 laurent laurent 44 2006-10-01 15:36 00-index-key
[...]
~$ sudo umount /dev/scd0


Second test : mount with dmode=0755 option. Does work as expected too.

~$ sudo mount -oro,dmode=0755 -t udf /dev/sr0 /media/cdrom/
~$ grep /media/cdrom /proc/mounts
/dev/scd0 /media/cdrom udf ro,dmode=755,utf8 0 0
~$ ls -al /media/cdrom/
total 46
drwxr-xr-x 5 root root 344 2007-12-24 18:09 .
drwxr-xr-x 12 root root 4096 2008-12-01 20:04 ..
drwxr-xr-x 2 laurent laurent 7112 2008-11-30 20:14 flexbackup
drwxr-xr-x 2 root root 40 2005-11-20 23:37 lost+found
drwxr-xr-x 10 laurent laurent 4548 2005-11-25 18:18 patches
~$ ls -al /media/cdrom/flexbackup/
total 4307946
drwxr-xr-x 2 laurent laurent 7112 2008-11-30 20:14 .
drwxr-xr-x 5 root root 344 2007-12-24 18:09 ..
-rw-r----- 1 laurent laurent 44 2006-10-01 15:36 00-index-key
[...]

Tested-by: Laurent Riffard <[email protected]>

> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index 6612a27..9eeb726 100644
> --- a/fs/udf/inode.c
> +++ b/fs/udf/inode.c
> @@ -1222,10 +1222,10 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
> iinfo->i_lenExtents = inode->i_size;
>
> if (fe->icbTag.fileType != ICBTAG_FILE_TYPE_DIRECTORY &&
> - sbi->s_fmode != -1)
> + sbi->s_fmode != (mode_t)-1)
> inode->i_mode = sbi->s_fmode;
> else if (fe->icbTag.fileType == ICBTAG_FILE_TYPE_DIRECTORY &&
> - sbi->s_dmode != -1)
> + sbi->s_dmode != (mode_t)-1)
> inode->i_mode = sbi->s_dmode;
> else
> inode->i_mode = udf_convert_permissions(fe);
> diff --git a/fs/udf/super.c b/fs/udf/super.c
> index e5d121d..af8a771 100644
> --- a/fs/udf/super.c
> +++ b/fs/udf/super.c
> @@ -284,9 +284,9 @@ static int udf_show_options(struct seq_file *seq, struct vfsmount *mnt)
> seq_printf(seq, ",gid=%u", sbi->s_gid);
> if (sbi->s_umask != 0)
> seq_printf(seq, ",umask=%o", sbi->s_umask);
> - if (sbi->s_fmode != -1)
> + if (sbi->s_fmode != (mode_t)-1)
> seq_printf(seq, ",mode=%o", sbi->s_fmode);
> - if (sbi->s_dmode != -1)
> + if (sbi->s_dmode != (mode_t)-1)
> seq_printf(seq, ",dmode=%o", sbi->s_dmode);
> if (UDF_QUERY_FLAG(sb, UDF_FLAG_SESSION_SET))
> seq_printf(seq, ",session=%u", sbi->s_session);

Thanks
~~
laurent



2008-12-01 23:23:18

by Marcin Slusarz

[permalink] [raw]
Subject: [PATCH] udf: fix default mode and dmode options handling

On Mon, Dec 01, 2008 at 08:28:02PM +0100, Laurent Riffard wrote:
> >> With next-2008-11-28, I was unable to mount an UDF-formatted DVD-RW:
> > Can you check whether attached patch fixes it?
> Current kernel is next-20081128 + reiser4 patches + your patch: it seems to works well now.
> (...)
> Tested-by: Laurent Riffard <[email protected]>

Thanks!

Jan, please apply this patch:

---
From: Marcin Slusarz <[email protected]>
Subject: [PATCH] udf: fix default mode and dmode options handling

On x86 (and several other archs) mode_t is defined as "unsigned short"
and comparing unsigned shorts to negative ints is broken (because short
is promoted to int and then compared). Fix it.

Reported-and-tested-by: Laurent Riffard <[email protected]>
Signed-off-by: Marcin Slusarz <[email protected]>
---
fs/udf/inode.c | 4 ++--
fs/udf/super.c | 8 ++++----
fs/udf/udf_sb.h | 2 ++
3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 6612a27..2d7e56a 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1222,10 +1222,10 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
iinfo->i_lenExtents = inode->i_size;

if (fe->icbTag.fileType != ICBTAG_FILE_TYPE_DIRECTORY &&
- sbi->s_fmode != -1)
+ sbi->s_fmode != UDF_INVALID_MODE)
inode->i_mode = sbi->s_fmode;
else if (fe->icbTag.fileType == ICBTAG_FILE_TYPE_DIRECTORY &&
- sbi->s_dmode != -1)
+ sbi->s_dmode != UDF_INVALID_MODE)
inode->i_mode = sbi->s_dmode;
else
inode->i_mode = udf_convert_permissions(fe);
diff --git a/fs/udf/super.c b/fs/udf/super.c
index e5d121d..8deaa61 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -284,9 +284,9 @@ static int udf_show_options(struct seq_file *seq, struct vfsmount *mnt)
seq_printf(seq, ",gid=%u", sbi->s_gid);
if (sbi->s_umask != 0)
seq_printf(seq, ",umask=%o", sbi->s_umask);
- if (sbi->s_fmode != -1)
+ if (sbi->s_fmode != UDF_INVALID_MODE)
seq_printf(seq, ",mode=%o", sbi->s_fmode);
- if (sbi->s_dmode != -1)
+ if (sbi->s_dmode != UDF_INVALID_MODE)
seq_printf(seq, ",dmode=%o", sbi->s_dmode);
if (UDF_QUERY_FLAG(sb, UDF_FLAG_SESSION_SET))
seq_printf(seq, ",session=%u", sbi->s_session);
@@ -1894,8 +1894,8 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
uopt.uid = -1;
uopt.gid = -1;
uopt.umask = 0;
- uopt.fmode = -1;
- uopt.dmode = -1;
+ uopt.fmode = UDF_INVALID_MODE;
+ uopt.dmode = UDF_INVALID_MODE;

sbi = kzalloc(sizeof(struct udf_sb_info), GFP_KERNEL);
if (!sbi)
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
index 5d32c60..158221e 100644
--- a/fs/udf/udf_sb.h
+++ b/fs/udf/udf_sb.h
@@ -48,6 +48,8 @@
#define UDF_SPARABLE_MAP15 0x1522U
#define UDF_METADATA_MAP25 0x2511U

+#define UDF_INVALID_MODE ((mode_t)-1)
+
#pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */

struct udf_meta_data {
--
1.5.6.4

2008-12-02 13:38:19

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCH] udf: fix default mode and dmode options handling

On Tue 02-12-08 00:22:31, Marcin Slusarz wrote:
> On Mon, Dec 01, 2008 at 08:28:02PM +0100, Laurent Riffard wrote:
> > >> With next-2008-11-28, I was unable to mount an UDF-formatted DVD-RW:
> > > Can you check whether attached patch fixes it?
> > Current kernel is next-20081128 + reiser4 patches + your patch: it seems to works well now.
> > (...)
> > Tested-by: Laurent Riffard <[email protected]>
>
> Thanks!
>
> Jan, please apply this patch:
OK, committed.

Honza

> ---
> From: Marcin Slusarz <[email protected]>
> Subject: [PATCH] udf: fix default mode and dmode options handling
>
> On x86 (and several other archs) mode_t is defined as "unsigned short"
> and comparing unsigned shorts to negative ints is broken (because short
> is promoted to int and then compared). Fix it.
>
> Reported-and-tested-by: Laurent Riffard <[email protected]>
> Signed-off-by: Marcin Slusarz <[email protected]>
> ---
> fs/udf/inode.c | 4 ++--
> fs/udf/super.c | 8 ++++----
> fs/udf/udf_sb.h | 2 ++
> 3 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index 6612a27..2d7e56a 100644
> --- a/fs/udf/inode.c
> +++ b/fs/udf/inode.c
> @@ -1222,10 +1222,10 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
> iinfo->i_lenExtents = inode->i_size;
>
> if (fe->icbTag.fileType != ICBTAG_FILE_TYPE_DIRECTORY &&
> - sbi->s_fmode != -1)
> + sbi->s_fmode != UDF_INVALID_MODE)
> inode->i_mode = sbi->s_fmode;
> else if (fe->icbTag.fileType == ICBTAG_FILE_TYPE_DIRECTORY &&
> - sbi->s_dmode != -1)
> + sbi->s_dmode != UDF_INVALID_MODE)
> inode->i_mode = sbi->s_dmode;
> else
> inode->i_mode = udf_convert_permissions(fe);
> diff --git a/fs/udf/super.c b/fs/udf/super.c
> index e5d121d..8deaa61 100644
> --- a/fs/udf/super.c
> +++ b/fs/udf/super.c
> @@ -284,9 +284,9 @@ static int udf_show_options(struct seq_file *seq, struct vfsmount *mnt)
> seq_printf(seq, ",gid=%u", sbi->s_gid);
> if (sbi->s_umask != 0)
> seq_printf(seq, ",umask=%o", sbi->s_umask);
> - if (sbi->s_fmode != -1)
> + if (sbi->s_fmode != UDF_INVALID_MODE)
> seq_printf(seq, ",mode=%o", sbi->s_fmode);
> - if (sbi->s_dmode != -1)
> + if (sbi->s_dmode != UDF_INVALID_MODE)
> seq_printf(seq, ",dmode=%o", sbi->s_dmode);
> if (UDF_QUERY_FLAG(sb, UDF_FLAG_SESSION_SET))
> seq_printf(seq, ",session=%u", sbi->s_session);
> @@ -1894,8 +1894,8 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
> uopt.uid = -1;
> uopt.gid = -1;
> uopt.umask = 0;
> - uopt.fmode = -1;
> - uopt.dmode = -1;
> + uopt.fmode = UDF_INVALID_MODE;
> + uopt.dmode = UDF_INVALID_MODE;
>
> sbi = kzalloc(sizeof(struct udf_sb_info), GFP_KERNEL);
> if (!sbi)
> diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
> index 5d32c60..158221e 100644
> --- a/fs/udf/udf_sb.h
> +++ b/fs/udf/udf_sb.h
> @@ -48,6 +48,8 @@
> #define UDF_SPARABLE_MAP15 0x1522U
> #define UDF_METADATA_MAP25 0x2511U
>
> +#define UDF_INVALID_MODE ((mode_t)-1)
> +
> #pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */
>
> struct udf_meta_data {
> --
> 1.5.6.4
>
--
Jan Kara <[email protected]>
SUSE Labs, CR