mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: Peter Astrand <peter@cendio.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ncpfs problems
Date: Wed, 1 Sep 2004 18:27:13 +0200	[thread overview]
Message-ID: <255B8A94A7B@vcnet.vc.cvut.cz> (raw)

On  1 Sep 04 at 15:59, Peter Astrand wrote:
> > > * Some files are impossible to remove, for example the files in 
> > > ~/.kde/socket-dhcp-253-234: An unlink returns EBUSY:
> > > 
> > > unlink("kdeinit_maggie_2")              = -1 EBUSY (Device or resource busy)
> > > 
> > > Do you have any ideas what can cause this? Do you consider ncpfs stable
> > > enough to be used for the home directory? 
> > 
> > File is open... You cannot remove opened files from Netware filesystem.
> > I cannot think about any other reason why you should get EBUSY.
> 
> It might have something to do with open files, but in that case, the
> behaviour is not consistent. I've just did a quick test with "cat
> > foo.txt", and was able to delete the file while it was still open:
> 
> # ls -l /proc/21642/fd
> ...
> l-wx------  1 adam 1000 64 Sep  1 15:39 1 -> /home/adam/foo.txt (deleted)
> ...

ncp_unlink closes file on server if there is no read or write
operation in progress - see ncp_make_open, ncp_inode_close and
ncp_make_closed: ncp_make_open opens file on server, ncp_inode_close
marks file as being "closable" and ncp_make_closed closes file unless
someone is in ncp_make_open - ncp_inode_close region.

Cannot be kdeinit_maggie_2 opened by someone else?

BTW, ncpfs is "single threaded" because protocol itself is single
threaded - you can have only one outstanding request. Even with TCP
transport which could allow more than one outstanding request, leaving
synchronization on TCP level, if you send data to server while
it processes another request some server versions return back 9999,
server busy, instead of leaving received data in the queue until
previous request is satisfied :-(

Actually with 2.6.x fs/ncpfs/sock.c changing code to not call
ncp_abort_connection() when something goes wrong should not be that
hard. Only problem is that ncp_request_reply structure is allocated
on caller stack, and so you must kill receiver (ncpdgram_rcv_proc/
ncptcp_rcv_proc) before you release this structure.

But main question is whether it is really needed... It works this way
since day #1 (old kernels actually used SIGKILL|SIGSTOP, making
debugging of processes using ncpfs filesystem almost impossible, yet
nobody complained).
                                                Petr Vandrovec
                                                


             reply	other threads:[~2004-09-01 16:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-01 16:27 Petr Vandrovec [this message]
2004-09-01 20:30 ` Peter Astrand
     [not found] <2505C593E0E@vcnet.vc.cvut.cz>
2004-09-01 11:57 ` Peter Astrand
2004-09-01 12:26   ` Anton Altaparmakov
2004-09-01 13:59 ` Peter Astrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=255B8A94A7B@vcnet.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@cendio.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®