Date: Fri, 29 Mar 2002 08:30:03 -0800 (PST) From: Paul Trunley <paul@trunley.org> To: freebsd-ports@FreeBSD.org Subject: Re: ports/29704: Imagemagick Identify utility crashes when used on smbfs mounted share Message-ID: <200203291630.g2TGU3F71411@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/29704; it has been noted by GNATS. From: Paul Trunley <paul@trunley.org> To: Boris Popov <bp@freebsd.org> Cc: freebsd-gnats-submit@freebsd.org, ppathiakis@homeportfolio.com Subject: Re: ports/29704: Imagemagick Identify utility crashes when used on smbfs mounted share Date: Fri, 29 Mar 2002 08:23:21 -0800 --------------Boundary-00=_XITQIG01BHKICSMRXQVX Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit On Saturday 23 March 2002 08:58 pm, Boris Popov wrote: [deletia] > > One of the possible solutions is to remove smb_close request from > smbfs_close() vop and leave it only in the smbfs_inactive(), but this will > not allow programs to immediately release a file by just closing it. I took your advice and tried this out and it seems to work well. It certainly solves the mmap issue. I don't think that this changes the ability for a file to be released upon close because the system will call inactive immediately after the last close, so the effect is the same as doing the smb close request in the close vop. I've attached a patch I put together that implements this change, I've done a little testing and it seems to work ok, but nothing exhaustive. This patch is a minimal change, but it might be better to replace n_opencount with a single bit in the n_flag member of the smbnode structure, since there isn't really a need to remember the number of opens. All that needs to be remembered is if the file is currently open or not. If you'd like me to pursue this I'd be more than willing. --------------Boundary-00=_XITQIG01BHKICSMRXQVX Content-Type: text/x-diff; charset="iso-8859-1"; name="29704.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="29704.patch" ZGlmZiAtdSBvcmlnL3NtYmZzX25vZGUuYyAuL3NtYmZzX25vZGUuYwotLS0gb3JpZy9zbWJmc19u b2RlLmMJV2VkIE1hciAyNyAyMDozMDozNyAyMDAyCisrKyAuL3NtYmZzX25vZGUuYwlUaHUgTWFy IDI4IDIwOjI4OjE0IDIwMDIKQEAgLTM0Nyw3ICszNDcsOCBAQAogCQll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CiAJCQly ZXR1cm4gMDsKIAkJaWYgKG5wLT5uX2RpcnNlcSkgewpAQCAtMjU5LDE1ICsyNTgsMTAgQEAKIAkJ CW5wLT5uX2RpcnNlcSA9IE5VTEw7CiAJCX0KIAkJZXJyb3IgPSAwOworCQlzbWJmc19hdHRyX2Nh Y2hlcmVtb3ZlKHZwKTsKIAl9IGVsc2UgewogCQllcnJvciA9IHNtYmZzX3ZpbnZhbGJ1Zih2cCwg Vl9TQVZFLCBhcC0+YV9jcmVkLCBwLCAxKTsKLQkJaWYgKG5wLT5uX29wZW5jb3VudCkKLQkJCXJl dHVybiBlcnJvcjsKLQkJVk9QX0dFVEFUVFIodnAsICZ2YXR0ciwgYXAtPmFfY3JlZCwgcCk7Ci0J CWVycm9yID0gc21iZnNfc21iX2Nsb3NlKG5wLT5uX21vdW50LT5zbV9zaGFyZSwgbnAtPm5fZmlk LCAKLQkJCSAgICZucC0+bl9tdGltZSwgJnNjcmVkKTsKIAl9Ci0Jc21iZnNfYXR0cl9jYWNoZXJl bW92ZSh2cCk7CiAJcmV0dXJuIGVycm9yOwogfQogCg== --------------Boundary-00=_XITQIG01BHKICSMRXQVX-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203291630.g2TGU3F71411>