public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* mounting windows shares with path exactly like on windows
@ 2008-08-28  9:59 kovlensky
  2008-08-29  9:36 ` el es
  2008-08-29  9:49 ` Walter Franzini
  0 siblings, 2 replies; 10+ messages in thread
From: kovlensky @ 2008-08-28  9:59 UTC (permalink / raw)
  To: linux-kernel

I'm sorry to be slightly off topic, when it comes to this list, but I have no clue where to look for that and I think it can be doe on kernel level only.

In short - I've got bunch of applications running both on windows and linux and these applications exchange links to files mounted on both sides. The problem is that these paths are different, i.e. like D:/dir/file on windows and /mountpoint/dir/file on Linux. What I need is unifying them. So my idea is to have path translator on anything on kernel level, which will make Linux open call to D:/dir/file on Linux work and open /mountpoint/dir/file. Was anything close to that ever incorporated in kernel?

Applications are, as usual, closed source, and support for them, also as usual, answers "won't be fixed, switch to Windows, please". Very helpful.

Any other ideas of solving this problem are also warmly welcomed. Also on windows side.

----------------------------------------------------------------------
Nie szukam kochanka!
>> http://link.interia.pl/f1eeb


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

* Re: mounting windows shares with path exactly like on windows
@ 2008-08-29  8:03 Alan Jenkins
  0 siblings, 0 replies; 10+ messages in thread
From: Alan Jenkins @ 2008-08-29  8:03 UTC (permalink / raw)
  To: kovlensky; +Cc: linux-kernel

kovlensky@interia.pl wrote:

> I'm sorry to be slightly off topic, when it comes to this list, but I have
> no clue where to look for that and I think it can be doe on kernel level
> only.
>
> In short - I've got bunch of applications running both on windows and
> linux and these applications exchange links to files mounted on both
> sides. The problem is that these paths are different, i.e. like
> D:/dir/file on windows and /mountpoint/dir/file on Linux. What I need is
> unifying them. So my idea is to have path translator on anything on kernel
> level, which will make Linux open call to D:/dir/file on Linux work and
> open /mountpoint/dir/file. Was anything close to that ever incorporated in
> kernel?

Um, no.

More likely solutions are ptrace (intercept system calls using debugging
interface) or similar LD_PRELOAD magic (see fakeroot for an example).

> Applications are, as usual, closed source, and support for them, also as
> usual, answers "won't be fixed, switch to Windows, please". Very helpful.
>
> Any other ideas of solving this problem are also warmly welcomed. Also on
> windows side.

I thought modern windows supported unix-like mounts, a bit like the old
SUBST.EXE in dos.  So you could then mount all other drive letters as
subdirectories on the main drive.  Don't ask me how to do it though :-).

Alan

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

* Re: mounting windows shares with path exactly like on windows
@ 2008-08-29  8:18 Tomasz Chmielewski
  2008-08-29  8:40 ` Alan Jenkins
  0 siblings, 1 reply; 10+ messages in thread
From: Tomasz Chmielewski @ 2008-08-29  8:18 UTC (permalink / raw)
  To: LKML; +Cc: alan-jenkins, kovlensky

> In short - I've got bunch of applications running both on windows and linux and these applications \
> exchange links to files mounted on both sides. The problem is that these paths are different, i.e. like \
> D:/dir/file on windows and /mountpoint/dir/file on Linux. What I need is unifying them. So my idea is to \
> have path translator on anything on kernel level, which will make Linux open call to D:/dir/file on Linux \
> work and open /mountpoint/dir/file. Was anything close to that ever incorporated in kernel?

What's wrong with just:

# mkdir -p /D:/dir
# mount.cifs ...
# touch /D:/dir/file

?

Or, use symlinks from /D:/dir to /mountpoint/dir/


-- 
Tomasz Chmielewski
http://wpkg.org


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

* Re: mounting windows shares with path exactly like on windows
  2008-08-29  8:18 Tomasz Chmielewski
@ 2008-08-29  8:40 ` Alan Jenkins
  0 siblings, 0 replies; 10+ messages in thread
From: Alan Jenkins @ 2008-08-29  8:40 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: LKML, kovlensky

Tomasz Chmielewski wrote:
>> In short - I've got bunch of applications running both on windows and
>> linux and these applications \
>> exchange links to files mounted on both sides. The problem is that
>> these paths are different, i.e. like \
>> D:/dir/file on windows and /mountpoint/dir/file on Linux. What I need
>> is unifying them. So my idea is to \
>> have path translator on anything on kernel level, which will make
>> Linux open call to D:/dir/file on Linux \
>> work and open /mountpoint/dir/file. Was anything close to that ever
>> incorporated in kernel?
>
> What's wrong with just:
>
> # mkdir -p /D:/dir
> # mount.cifs ...
> # touch /D:/dir/file
>
> ?
>
> Or, use symlinks from /D:/dir to /mountpoint/dir/
That only works from the root directory though.  In unix, "C:/" is a
relative path.

Alan


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

* Re: mounting windows shares with path exactly like on windows
@ 2008-08-29  8:50 Tomasz Chmielewski
  2008-08-29  9:13 ` Thorsten Kranzkowski
  0 siblings, 1 reply; 10+ messages in thread
From: Tomasz Chmielewski @ 2008-08-29  8:50 UTC (permalink / raw)
  To: LKML; +Cc: alan-jenkins, kovlensky

Alan Jenkins wrote:

> Tomasz Chmielewski wrote:
>>> In short - I've got bunch of applications running both on windows and
>>> linux and these applications \
>>> exchange links to files mounted on both sides. The problem is that
>>> these paths are different, i.e. like \
>>> D:/dir/file on windows and /mountpoint/dir/file on Linux. What I need
>>> is unifying them. So my idea is to \
>>> have path translator on anything on kernel level, which will make
>>> Linux open call to D:/dir/file on Linux \
>>> work and open /mountpoint/dir/file. Was anything close to that ever
>>> incorporated in kernel?
>>
>> What's wrong with just:
>>
>> # mkdir -p /D:/dir
>> # mount.cifs ...
>> # touch /D:/dir/file
>>
>> ?
>>
>> Or, use symlinks from /D:/dir to /mountpoint/dir/
> That only works from the root directory though.  In unix, "C:/" is a
> relative path.

Yeah, creating "C:" symlink in each and every directory accessed by the 
application doesn't sound like a neat solution.

BTW, it's the first time I hear about a unix application which has paths 
like D:/ or C:/ hardcoded.


-- 
Tomasz Chmielewski
http://wpkg.org

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

* Re: mounting windows shares with path exactly like on windows
  2008-08-29  8:50 Tomasz Chmielewski
@ 2008-08-29  9:13 ` Thorsten Kranzkowski
  0 siblings, 0 replies; 10+ messages in thread
From: Thorsten Kranzkowski @ 2008-08-29  9:13 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: LKML, alan-jenkins, kovlensky

On Fri, Aug 29, 2008 at 10:50:51AM +0200, Tomasz Chmielewski wrote:
> Alan Jenkins wrote:
>
>> Tomasz Chmielewski wrote:
>>>> In short - I've got bunch of applications running both on windows and
>>>> linux and these applications \
>>>> exchange links to files mounted on both sides. The problem is that
>>>> these paths are different, i.e. like \
>>>> D:/dir/file on windows and /mountpoint/dir/file on Linux. What I need
>>>> is unifying them. So my idea is to \
>>>> have path translator on anything on kernel level, which will make
>>>> Linux open call to D:/dir/file on Linux \
>>>> work and open /mountpoint/dir/file. Was anything close to that ever
>>>> incorporated in kernel?
>>>
>>> What's wrong with just:
>>>
>>> # mkdir -p /D:/dir
>>> # mount.cifs ...
>>> # touch /D:/dir/file
>>>
>>> ?
>>>
>>> Or, use symlinks from /D:/dir to /mountpoint/dir/
>> That only works from the root directory though.  In unix, "C:/" is a
>> relative path.
>
> Yeah, creating "C:" symlink in each and every directory accessed by the 
> application doesn't sound like a neat solution.

current working directory, actually. Which means you don't necessarily have
to use the filesystem root but only a proper start directory for these
mounts/links. But yeah, we don't know if said proprietary application 
does/doesn't cwd() to it. 

I suggest extending this mess a bit:

# mkdir -p /server/share
# mount.cifs ... 

and use UNC paths. '//server/share/dir/file.txt' will work out nicely :-)

Thorsten.

> BTW, it's the first time I hear about a unix application which has paths 
> like D:/ or C:/ hardcoded.
>
>
> -- 
> Tomasz Chmielewski
> http://wpkg.org

-- 
| Thorsten Kranzkowski        Internet: dl8bcu@dl8bcu.de                      |
| Mobile: ++49 170 1876134       Snail: Kiebitzstr. 14, 49324 Melle, Germany  |
| Ampr: dl8bcu@db0lj.#rpl.deu.eu, dl8bcu@marvin.dl8bcu.ampr.org [44.130.8.19] |

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

* Re: mounting windows shares with path exactly like on windows
  2008-08-28  9:59 kovlensky
@ 2008-08-29  9:36 ` el es
  2008-08-29  9:49 ` Walter Franzini
  1 sibling, 0 replies; 10+ messages in thread
From: el es @ 2008-08-29  9:36 UTC (permalink / raw)
  To: linux-kernel

 <kovlensky <at> interia.pl> writes:

[irony]
> Applications are, as usual, closed source, and support for them, also as
> usual, answers "won't be fixed, switch to Windows, please". Very helpful.

Name the app, so we know what to avoid ... :J
[/irony]

> 
> Any other ideas of solving this problem are also warmly welcomed. Also on 
> windows side.
> 

Look how WINE does this - maybe run the Windows native under Linux+WINE would
help ?

el es



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

* Re: mounting windows shares with path exactly like on windows
  2008-08-28  9:59 kovlensky
  2008-08-29  9:36 ` el es
@ 2008-08-29  9:49 ` Walter Franzini
  1 sibling, 0 replies; 10+ messages in thread
From: Walter Franzini @ 2008-08-29  9:49 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]

kovlensky@interia.pl writes:

> I'm sorry to be slightly off topic, when it comes to this list, but
> I have no clue where to look for that and I think it can be doe on
> kernel level only.
>
> In short - I've got bunch of applications running both on windows
> and linux and these applications exchange links to files mounted on
> both sides. The problem is that these paths are different, i.e. like
> D:/dir/file on windows and /mountpoint/dir/file on Linux. What I
> need is unifying them. So my idea is to have path translator on
> anything on kernel level, which will make Linux open call to
> D:/dir/file on Linux work and open /mountpoint/dir/file. Was
> anything close to that ever incorporated in kernel?
>
> Applications are, as usual, closed source, and support for them,
> also as usual, answers "won't be fixed, switch to Windows,
> please". Very helpful.
>
> Any other ideas of solving this problem are also warmly
> welcomed. Also on windows side.

You may want to look at plasticfs (http://plasticfs.sourceforge.net/)

It does not do what you need, but should not be to difficult to
change.

From the Home Page:
------------------------------------------------------------------------
The Plastic File System is an LD_PRELOAD module for manipulating what
the file system looks like for programs. This allows virtual file
systems to exist in user space, without kernel hacks or modules.
------------------------------------------------------------------------

HTH
-- 
Walter Franzini
http://aegis.stepbuild.org/

PGP Public key ID: 1024D/CB3FEB43
Key fingerprint  : FA26 C33B CAFF 7848 EFEB  7327 96AA 2D57 CB3F EB43
Key server       : http://www.keyserver.net

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: mounting windows shares with path exactly like on windows
@ 2008-08-29 10:54 kovlensky
  2008-08-29 11:11 ` Al Viro
  0 siblings, 1 reply; 10+ messages in thread
From: kovlensky @ 2008-08-29 10:54 UTC (permalink / raw)
  To: linux-kernel

All,

Thank you for massive support. First - all of you miss one important issue - slash/backlash conversion, when transferring path from Linux to Windows and back. Second - that's corporate with tens of people relying on these systems running. Answering questions about application - that's big engineering one, with port existing on many os'es. Objects, which are created there, point to physical files on disk. It's like symlink. One symlink per object. As these symlinks are simply single paths to file I find it impossible to develop any method of having a link working on both Linux and Windows. Also writing anything on my own won't work - I know that it can be done with LD_PRELOAD for example, but try convincing big corporation that their development-critical environment can safely rely on your custom piece of code...

Many suggestions were very helpful, but, unfortunately, looks like no real linux world approved solution exisits.

Regards,

Zdenek


Alan Jenkins napisał(a):
> kovlensky@interia.pl wrote:
> 
> > I&#039;m sorry to be slightly off topic, when it comes to this list, but I
> have
> > no clue where to look for that and I think it can be doe on kernel
> level
> > only.
> >
> > In short - I&#039;ve got bunch of applications running both on windows and
> > linux and these applications exchange links to files mounted on both
> > sides. The problem is that these paths are different, i.e. like
> > D:/dir/file on windows and /mountpoint/dir/file on Linux. What I need
> is
> > unifying them. So my idea is to have path translator on anything on
> kernel
> > level, which will make Linux open call to D:/dir/file on Linux work and
> > open /mountpoint/dir/file. Was anything close to that ever incorporated
> in
> > kernel?
> 
> Um, no.
> 
> More likely solutions are ptrace (intercept system calls using debugging
> interface) or similar LD_PRELOAD magic (see fakeroot for an example).
> 
> > Applications are, as usual, closed source, and support for them, also
> as
> > usual, answers "won&#039;t be fixed, switch to Windows, please". Very
> helpful.
> >
> > Any other ideas of solving this problem are also warmly welcomed. Also
> on
> > windows side.
> 
> I thought modern windows supported unix-like mounts, a bit like the old
> SUBST.EXE in dos.  So you could then mount all other drive letters as
> subdirectories on the main drive.  Don&#039;t ask me how to do it though :-).
> 
> Alan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 



----------------------------------------------------------------------
Tani telefon!
Sprawdz >>> http://link.interia.pl/f1ef5 



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

* Re: mounting windows shares with path exactly like on windows
  2008-08-29 10:54 mounting windows shares with path exactly like on windows kovlensky
@ 2008-08-29 11:11 ` Al Viro
  0 siblings, 0 replies; 10+ messages in thread
From: Al Viro @ 2008-08-29 11:11 UTC (permalink / raw)
  To: kovlensky; +Cc: linux-kernel

On Fri, Aug 29, 2008 at 12:54:20PM +0200, kovlensky@interia.pl wrote:
> All,
> 
> Thank you for massive support. First - all of you miss one important issue - slash/backlash conversion, when transferring path from Linux to Windows and back. Second - that's corporate with tens of people relying on these systems running. Answering questions about application - that's big engineering one, with port existing on many os'es. Objects, which are created there, point to physical files on disk. It's like symlink. One symlink per object. As these symlinks are simply single paths to file I find it impossible to develop any method of having a link working on both Linux and Windows. Also writing anything on my own won't work - I know that it can be done with LD_PRELOAD for example, but try convincing big corporation that their development-critical environment can safely rely on your custom piece of code...
 
If they have port to many OSes, they have dealt with that before and
solution used for e.g. Solaris would very likely be a good start...

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

end of thread, other threads:[~2008-08-29 11:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-29 10:54 mounting windows shares with path exactly like on windows kovlensky
2008-08-29 11:11 ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2008-08-29  8:50 Tomasz Chmielewski
2008-08-29  9:13 ` Thorsten Kranzkowski
2008-08-29  8:18 Tomasz Chmielewski
2008-08-29  8:40 ` Alan Jenkins
2008-08-29  8:03 Alan Jenkins
2008-08-28  9:59 kovlensky
2008-08-29  9:36 ` el es
2008-08-29  9:49 ` Walter Franzini

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