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 296422 Details for
Bug 432824
GFS2: warning: assertion "al->al_alloced" failed in alloc_page_backing
[?]
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.
program to recreate bug
gen_shrink.c (text/x-csrc), 1.23 KB, created by
Abhijith Das
on 2008-02-29 21:42:11 UTC
(
hide
)
Description:
program to recreate bug
Filename:
MIME Type:
Creator:
Abhijith Das
Created:
2008-02-29 21:42:11 UTC
Size:
1.23 KB
patch
obsolete
>#include <stdio.h> >#include <unistd.h> >#include <stdlib.h> >#include <signal.h> >#include <setjmp.h> >#include <string.h> >#include <limits.h> >#include <errno.h> >#include <dirent.h> >#include <fcntl.h> >#include <ctype.h> >#include <time.h> >#include <sched.h> >#include <sys/mman.h> >#include <sys/times.h> >#include <sys/types.h> >#include <sys/stat.h> >#include <sys/wait.h> >#include <sys/file.h> > > >char bar[] = "/mnt/brawl/bar"; >char tmp[] = "/tmp/t"; >char megbuf[50000]; >int barsize = 50000; > >void create() >{ > int fd; > fd = open(bar, O_RDWR|O_CREAT, 0666); > write(fd, megbuf, barsize); > close(fd); >} > >void shrink1() >{ > int fd, tsize; > char *oldfilep; > struct stat sb; > > fd = open(bar, O_RDWR); > fstat(fd, &sb); > tsize = 41000; > > oldfilep = mmap(0, sb.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); > > ftruncate(fd, tsize); > > memcpy(oldfilep, megbuf, tsize); > munmap(oldfilep, sb.st_size); > > close(fd); >} > >void shrink2() >{ > int fd; > struct stat sb; > char *oldfilep; > char buf[41000]; > > fd = open(bar, O_RDWR); > fstat(fd, &sb); > > oldfilep = mmap(0, sb.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); > memcpy(buf, oldfilep, 40961); > munmap(oldfilep, sb.st_size); > > close(fd); >} > >int main(int argc, char **argv) >{ > create(); > shrink1(); > shrink2(); > 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 432824
: 296422