Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jun 1997 12:39:48 +0200
From:      Gilles Bruno <Gilles.Bruno@ujf-grenoble.fr>
To:        hackers@freebsd.org, Gilles.Bruno@ujf-grenoble.fr
Subject:   mmap() question...
Message-ID:  <2.2.32.19970610103948.008c4cdc@adm.ujf-grenoble.fr>

next in thread | raw e-mail | index | archive | help
Hi everyone !
(here we go for some kind of newbie question...)

I tried -for testing purpose- to implement the FAST_SHARE_MODE feature of 
samba-1.9.16p11 on a FreeBSD 2.2.2-Release box. This implies the use of
both mmap() and lockf() systems calls.
After doing some minimal hacking in the samba source tree (mainly to replace
sysV lockf() call with the bsd's flock() in shmem.c) I managed to get it work.

*BUT* when I took a look in the (standard) /usr/local/samba/var/lock where the 
shared mem file resides, I found the following :

        {423}Root /bin/ls -a -l /usr/local/samba/var/locks
        total 60
        drwxr-xr-x  2 root  wheel         512 Jan 28 11:19 .
        drwxr-xr-x  3 root  wheel         512 Jan 28 11:36 ..
        -rw-rw-rw-  1 root  wheel      102400 Jan 28 11:26 SHARE_MEM_FILE
        -rw-rw-rw-  1 root  wheel  4294967304 Jan 28 12:04
SHARE_MEM_FILE.processes
                                   ^^^^^^^^^^
        -rw-r--r--  1 root  wheel         200 Jan 28 12:04 STATUS..LCK
        -rw-r--r--  1 root  wheel          77 Jan 28 11:19 browse.dat
        -rw-r--r--  1 root  wheel           0 Jan 28 11:19 wins.dat

Hike ! What's that ?

        {425}Root /usr/bin/du /usr/local/samba/var/locks
        59      /usr/local/samba/var/locks

        {426}Root /usr/bin/du
/usr/local/samba/var/locks/SHARE_MEM_FILE.processes 
        32      /usr/local/samba/var/locks/SHARE_MEM_FILE.processes

I presume that the size of the "SHARE_MEM_FILE.processes" (4Gb !)
reflects some sort of maximum addressable memory, isn't it ?

It would disturb me, if this directory had to be BACKED UP (using
dump/amanda)... 
(I presume it wouldn't hurt since the real amount of space taken by this
file is 32k, 
but if the dump use the same 'stat' method the /bin/ls does it would... No ?)

The same question also applies to the /stand directory wich contains gzip
executables
(whose size is 1064960 bytes...)
----------------------------------------------------------------------------
----------
Resume :
  . am I correct in my assertions / the size of this particular file
  . is the output of the ls command 'normal' ?
  . will this 'odditie' disturb either dump or tar (I'm concerned/anxious
about 'tar')

PS. Oops. Look's like I haven't set the time zone of this test box yet...
    Don't blame my poor english...
--
Gilles BRUNO 
Universite Joseph Fourier - CRIP
Domaine Universitaire 38041 St Martin d'Heres FRANCE
Tel (33) 04 76 63 56 68     Fax (33) 04 76 51 42 74




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2.2.32.19970610103948.008c4cdc>