Bug 11254 - nmbd rewrites browse.dat when not required.
Summary: nmbd rewrites browse.dat when not required.
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2015-05-04 15:47 UTC by Jeremy Allison
Modified: 2015-05-20 11:35 UTC (History)
2 users (show)

See Also:

git-am fix for master. (3.70 KB, patch)
2015-05-04 16:08 UTC, Jeremy Allison
no flags Details
git-am cherry-pick from master for 4.2.next, 4.1.next. (3.95 KB, patch)
2015-05-04 19:21 UTC, Jeremy Allison
asn: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2015-05-04 15:47:25 UTC
From: rac8006@aol.com
To: samba-technical@lists.samba.org
Subject: browse.dat file
X-Mailer: JAS STD

After doing some investigation.  I've found that about every twelve minutes the process
process_local_master_announce procedure.  This procedure also calls update_server_ttl
Both of these procedures sets subrec->work_changed to true.  The update_server_ttl
updades the ttl value.  but this value is not stored in the browse.dat file.  Yet it sets the
work_changed to true.   This causes the browse.dat file to be written.  The process local_master _announce
procedure either does a create_server or remove_server or updates  the record.  It should
write the browse.dat file id it creates or removes data.  But most of the time it is updating
the record with the same data that is already in the file.  Why does it have to open a new
file.  Write the data.  Close the file. unlink the file.  chmod on the file.  then rename the
file to browse.dat.  Every twelve minutes.

The WD MY Cloud NAS  after 10 minutes of no disk writes.  puts the disk in standby mode.
Then two minutes of so later it wakes the disk to rewrite the browse.dat file.
Why can't the file only be written when it changes.
Comment 1 Jeremy Allison 2015-05-04 16:08:21 UTC
Created attachment 11016 [details]
git-am fix for master.

Submitted to samba-technical. Back-ports to 4.2.next, 4.1.next to follow once it's in.
Comment 2 Jeremy Allison 2015-05-04 19:21:42 UTC
Created attachment 11017 [details]
git-am cherry-pick from master for 4.2.next, 4.1.next.

Fix that went into master, cherry-picked for 4.2.next, 4.1.next.
Comment 3 Andreas Schneider 2015-05-05 10:22:33 UTC
Comment on attachment 11017 [details]
git-am cherry-pick from master for 4.2.next, 4.1.next.

Comment 4 Andreas Schneider 2015-05-05 10:23:20 UTC
Karolin, please add the patches to the next releases. Thanks
Comment 5 Karolin Seeger 2015-05-20 11:35:52 UTC
Pushed to v4-1-test and v4-2-test.
Closing out bug report.