Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 454581 - ypbind rewrites unchanged binding files every 60s
Summary: ypbind rewrites unchanged binding files every 60s
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ypbind
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F10Target 454582
TreeView+ depends on / blocked
 
Reported: 2008-07-09 03:50 UTC by Eric Sandeen
Modified: 2008-10-21 11:01 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-21 11:01:08 UTC


Attachments (Terms of Use)
Proposed patch (deleted)
2008-08-21 22:33 UTC, Eric Sandeen
no flags Details | Diff
Fixed/updated patch (deleted)
2008-10-11 14:55 UTC, Eric Sandeen
no flags Details | Diff

Description Eric Sandeen 2008-07-09 03:50:18 UTC
[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 22:33:32 UTC
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 14:55:09 UTC
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.