Bug 454581 - ypbind rewrites unchanged binding files every 60s
ypbind rewrites unchanged binding files every 60s
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: ypbind (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Vitezslav Crhonek
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks: F10Target 454582
  Show dependency treegraph
 
Reported: 2008-07-08 23:50 EDT by Eric Sandeen
Modified: 2008-10-21 07:01 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-21 07:01:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (3.97 KB, patch)
2008-08-21 18:33 EDT, Eric Sandeen
no flags Details | Diff
Fixed/updated patch (3.63 KB, patch)
2008-10-11 10:55 EDT, Eric Sandeen
no flags Details | Diff

  None (edit)
Description Eric Sandeen 2008-07-08 23:50:18 EDT
[root@inode ~]# sysctl -w vm.block_dump=1
vm.block_dump = 1
[root@inode ~]# while true; do sleep 10; date; dmesg -c | grep redhat.com &&
md5sum /var/yp/binding/redhat.com.*; done
Tue Jul  8 22:40:21 CDT 2008
Tue Jul  8 22:40:31 CDT 2008
ypbind(3241): dirtied inode 33391 (redhat.com.1) on sda11
ypbind(3241): dirtied inode 37462 (redhat.com.2) on sda11
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.1
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.2
Tue Jul  8 22:40:41 CDT 2008
Tue Jul  8 22:40:51 CDT 2008
Tue Jul  8 22:41:01 CDT 2008
Tue Jul  8 22:41:11 CDT 2008
Tue Jul  8 22:41:21 CDT 2008
Tue Jul  8 22:41:31 CDT 2008
ypbind(3241): dirtied inode 33391 (redhat.com.1) on sda11
ypbind(3241): dirtied inode 37462 (redhat.com.2) on sda11
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.1
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.2
Tue Jul  8 22:41:41 CDT 2008
Tue Jul  8 22:41:51 CDT 2008
Tue Jul  8 22:42:01 CDT 2008
Tue Jul  8 22:42:11 CDT 2008
Tue Jul  8 22:42:21 CDT 2008
Tue Jul  8 22:42:31 CDT 2008
ypbind(3241): dirtied inode 33391 (redhat.com.1) on sda11
ypbind(3241): dirtied inode 37462 (redhat.com.2) on sda11
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.1
f6749c7ad64c1e06d86e091514bb3ad5  /var/yp/binding/redhat.com.2

....

this uses extra power and stops disks from spinning down.  Can the files be
rewritten only if changed?

Thanks,
-Eric
Comment 1 Eric Sandeen 2008-08-21 18:33:32 EDT
Created attachment 314759 [details]
Proposed patch

Without knowing much about ypbind, here's a potential patch.

It just keeps track of the last domain info that was written, and if it's unchanged since last time, it skips the writeout.
Comment 2 Eric Sandeen 2008-10-11 10:55:09 EDT
Created attachment 320097 [details]
Fixed/updated patch

The original patch was a bit hacky; Thorsten turned it into this, which he said he has upstream already.

Thanks,
-Eric

Note You need to log in before you can comment on or make changes to this bug.