Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 152589 Details for
Bug 236430
nfsd: BUG: using smp_processor_id() in preemptible code
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
breaknfs testcase
breaknfs.c (text/plain), 1.55 KB, created by
IBM Bug Proxy
on 2007-04-13 20:54:10 UTC
(
hide
)
Description:
breaknfs testcase
Filename:
MIME Type:
Creator:
IBM Bug Proxy
Created:
2007-04-13 20:54:10 UTC
Size:
1.55 KB
patch
obsolete
>// Program: breaknfs.c >// >// Compile: cc breaknfs.c -o breaknfs >// Run: ./breaknfs 100 [<nfs-mounted-dir>] >// >// Args: arg1 = # of copies of program to run simultaneously >// arg2 = A directory that is on an NFS-mounted filesystem > >#define NFS_MOUNT "/var/nfs" > >#include <stdio.h> >#include <stdlib.h> >#include <errno.h> >#include <unistd.h> >#include <fcntl.h> > >#define BUFFER_SIZE (1*1024*1024) >static char buffer[BUFFER_SIZE]; > >int main(int argc, char *argv[]) >{ > char* nfs_dir; > int count; > int fd; > int i; > int pid; > > char *files[] = {"file1", "file2", "file3", "file4", "file5"}; > > if (argc > 1) > count = atoi(argv[1]); > else > count = 1; > if (argc > 2) > nfs_dir = argv[2]; > else > nfs_dir = NFS_MOUNT; > > /* cd -> ... */ > if (chdir(nfs_dir) < 0) { > perror(nfs_dir); > exit(1); > } > > /* Fill buffer with numbers and letters, etc! */ > for ( i = 0; i < BUFFER_SIZE; i++ ) { > buffer[i] = '0' + (i & 0x3f); > if ( i && ((i % 80) == 0) ) > buffer[i] = '\n'; > } > > /* fork count-1 children */ > while (count-- > 1) { > pid = fork(); > if (pid == 0) { > /* child */ > break; > } else if (pid < 0) { > perror("fork"); > exit(1); > } > } > srandom(getpid()); > > /* Forever and a day ... */ > while(1) { > for (i = 0; i < 5; i++) { > int write_size; > > /* Write a random amount of bytes, truncating file before output */ > write_size = (random() % BUFFER_SIZE) + 1; > fd = open(files[i], O_WRONLY | O_CREAT | O_TRUNC, 0600); > if (fd < 0) { > perror("open"); > exit(1); > } > if (write(fd, buffer, write_size) < 0) { > perror("write"); > exit(1); > } > close(fd); > } > } > > return 0; >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 236430
: 152589 |
152770
|
152870