[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FS:DIRECTORY-LIST & IP-TCP/FTP



    Date: Thu, 10 May 90 18:47 EDT
    From: barmar@think.com (Barry Margolin)

	Date: Thu, 10 May 90 13:54 CDT
	From: dmitchell@backus.trc.amoco.com (Donald H. Mitchell)

	Stephen L. Nicoud comments on TCP-IP doing a directory listing for the whole
	directory (rather than specific file) when saving a new file on a Unix host.
	On the UX400S running NFS, I see the same behavior everytime I save a file.
	It is disturbing (especially for large directories).  Could it be related to
	trying to figure out the version numbers (even for versionless directories, it
	saves version numbers sometimes (I think only when the old file is held by a
	process and the Symbolics doesn't want to delete it even if the Symbolics is
	holding the handle due to slow release)).

    In the case of NFS, the reason you see this is because of version
    numbers.  The difference between normal and versioned directories
    is only whether the *newest* version of a file has a version number.
    Any time it is writing out a file it must list the directory to see
    whether an old version exists and then rename it with a version number.
    In order to determine the appropriate version number it has to search
    the directory for all the existing versions of the file.

    It has nothing to do with multiple processes having the same file open.

						    barmar

Don, if you are into Sport Death (you don't care to have backup copies of
files kept), this patch to NFS Client eliminates the directory list when
writing files, but also eliminates the keeping of backup copies of files.

;=====================================
(SYSTEM-INTERNALS:BEGIN-PATCH-SECTION)
(SYSTEM-INTERNALS:PATCH-SECTION-ATTRIBUTES
  "-*- Mode: LISP; Syntax: Common-lisp; Package: NFS; Base: 10; Lowercase: Yes; -*-")

(defmethod (stream-close-finish nfs-output-data-stream-mixin :new-version) ()
  (stream-close-finish self :supersede))