Okay, thanks.  If you send diffs, I can act as code reviewer, and I can 
also validate them, and if necessary, integrate them.  (Although we may 
need to reverse reviewer and integrator roles in that case.)  I was 
actually planning on taking a close look at maybe working on this bug 
myself anyway.

Anyway, just let me know what help, if any, you would like from me.

    -- Garrett

Frank Hofmann wrote:
>
> Ok, see this thing now.
>
> Disks can be opened as read/write even if you're requesting a readonly 
> mount. It seems the flash-based media that are lockable actually 
> refuse the writeable open hence it fails.
>
> Also, the order of things in pcfs_mount is wrong. It's not so much 
> that device_identify() is done before parse_mntopts() but rather that 
> the VOP_OPEN() call is done before then. Quite a few things need to be 
> moved around:
>
> - the instance structure is needed far earlier - before device_identify
>   to get everything correct.
> - the mount option parsing needs to be done first
> - have device_identify (which checks for VFS_RDONLY as well) done after
> - have the VOP_OPEN() stuff done after
>
> - make sure that the vfs_bsize assignment is only made after
>   pc_getfattype() was called - pcfs_clsize isn't initialized before.
>
> Sometimes, it helps if people actually _look_ at the code - thanks !
>
> I'm on holiday starting mid next week; I should be able to send you 
> diffs out for that fix, but cannot possibly integrate anything by then.
>
> FrankH.
>
>
> On Fri, 1 Feb 2008, Frank Hofmann wrote:
>
>>
>>
>> On Fri, 1 Feb 2008, Artem Kachitchkine wrote:
>>
>>>
>>>> [EMAIL PROTECTED]> pfexec truss -f -t mount mount -F pcfs -o ro
>>>> /dev/dsk/c2t0d0p0:1 /mnt
>>>> 3708:   mount("/dev/dsk/c2t0d0p0:1", "/mnt", MS_OPTIONSTR, "pcfs",
>>>> 0x00000000, 0, 0x08063240, 1024) Err#30 EROFS
>>>> mount: Read-only file system
>>>
>>> As another data point, submitter of 6642367 reports the same issue with
>>> USB-connected SD media on snv_79 and claims that it used to work on 
>>> snv_64a.
>>
>> It's a bug. The VOP_OPEN() of the device isn't done with the proper 
>> flags.
>>
>> Can't tell you out of my head why the changes to PCFS done inbetween 
>> those
>> two builds caused it. Still, a bug.
>>
>> Thx,
>> FrankH.
>>
>>>
>>> -Artem
>>> _______________________________________________
>>> opensolaris-code mailing list
>>> [email protected]
>>> http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
>>>
>> _______________________________________________
>> opensolaris-code mailing list
>> [email protected]
>> http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
>>

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to