]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.4.18-xfs-mmap.patch
- ported from linux-2.4.25-atmdd.patch
[packages/kernel.git] / linux-2.4.18-xfs-mmap.patch
CommitLineData
47d2991b
AM
1Index: xfs_lrw.c
2===================================================================
3RCS file: /cvs/linux-2.4-xfs/linux/fs/xfs/linux/xfs_lrw.c,v
4retrieving revision 1.148
5retrieving revision 1.149
6diff -u -r1.148 -r1.149
7--- linux/fs/xfs/linux/xfs_lrw.c 2002/06/14 18:03:36 1.148
8+++ linux/fs/xfs/linux/xfs_lrw.c 2002/06/18 14:14:30 1.149
9@@ -53,7 +53,7 @@
10 STATIC int xfs_iomap_write_direct(xfs_iocore_t *, loff_t, size_t, pb_bmap_t *,
11 int *, int, int);
12 STATIC int _xfs_imap_to_bmap(xfs_iocore_t *, xfs_off_t, xfs_bmbt_irec_t *,
13- pb_bmap_t *, int, int, bmap_flags_t);
14+ pb_bmap_t *, int, int);
15
16 #ifndef DEBUG
17 #define xfs_strat_write_check(io,off,count,imap,nimap)
18@@ -872,7 +872,7 @@
19
20 if (nimaps && !ISNULLSTARTBLOCK(imap[0].br_startblock)) {
21 *npbmaps = _xfs_imap_to_bmap(&ip->i_iocore, offset, imap,
22- pbmapp, nimaps, *npbmaps, 0);
23+ pbmapp, nimaps, *npbmaps);
24 return 0;
25 }
26
27@@ -1012,7 +1012,7 @@
28 XFS_IUNLOCK(mp, io, XFS_ILOCK_EXCL | XFS_EXTSIZE_WR);
29 maps = min(nimaps, *npbmaps);
30 *npbmaps = _xfs_imap_to_bmap(io, offset, &imap[i],
31- pbmapp, maps, *npbmaps, 0);
32+ pbmapp, maps, *npbmaps);
33 XFS_STATS_INC(xfsstats.xs_xstrat_quick);
34 return 0;
35 }
36@@ -1054,8 +1054,7 @@
37 xfs_bmbt_irec_t *imap,
38 pb_bmap_t *pbmapp,
39 int imaps, /* Number of imap entries */
40- int pbmaps, /* Number of pbmap entries */
41- bmap_flags_t flags)
42+ int pbmaps) /* Number of pbmap entries */
43 {
44 xfs_mount_t *mp;
45 xfs_fsize_t nisize;
46@@ -1074,7 +1073,7 @@
47 pbmapp->pbm_offset = XFS_FSB_TO_B(mp, imap->br_startoff);
48 pbmapp->pbm_delta = offset - pbmapp->pbm_offset;
49 pbmapp->pbm_bsize = XFS_FSB_TO_B(mp, imap->br_blockcount);
50- pbmapp->pbm_flags = flags;
51+ pbmapp->pbm_flags = 0;
52
53 start_block = imap->br_startblock;
54 if (start_block == HOLESTARTBLOCK) {
55@@ -1136,7 +1135,7 @@
56
57 if(nimaps) {
58 *npbmaps = _xfs_imap_to_bmap(io, offset, imap, pbmapp, nimaps,
59- *npbmaps, 0);
60+ *npbmaps);
61 } else
62 *npbmaps = 0;
63 return XFS_ERROR(error);
64@@ -1321,7 +1320,7 @@
65 }
66 } else {
67 pbmapp->pbm_bn = PAGE_BUF_DADDR_NULL;
68- pbmapp->pbm_flags = PBMF_DELAY|PBMF_NEW;
69+ pbmapp->pbm_flags = PBMF_DELAY;
70 }
71 pbmapp->pbm_target = io->io_flags & XFS_IOCORE_RT ?
72 mp->m_rtdev_targ.pb_targ :
73@@ -1732,7 +1731,8 @@
74 }
75
76 maps = min(nimaps, maps);
77- *npbmaps = _xfs_imap_to_bmap(io, offset, &imap[0], pbmapp, maps, *npbmaps, PBMF_NEW);
78+ *npbmaps = _xfs_imap_to_bmap(io, offset, &imap[0], pbmapp, maps,
79+ *npbmaps);
80 if(*npbmaps) {
81 /*
82 * this is new since xfs_iomap_read
83Index: xfs_iops.c
84===================================================================
85RCS file: /cvs/linux-2.4-xfs/linux/fs/xfs/linux/xfs_iops.c,v
86retrieving revision 1.151
87retrieving revision 1.152
88diff -u -r1.151 -r1.152
89--- linux/fs/xfs/linux/xfs_iops.c 2002/06/17 06:53:26 1.151
90+++ linux/fs/xfs/linux/xfs_iops.c 2002/06/18 14:14:30 1.152
91@@ -621,6 +621,9 @@
92 set_bit(BH_Mapped, &bh_result->b_state);
93 }
94
95+ if (create && !buffer_mapped(bh_result))
96+ set_bit(BH_New, &bh_result->b_state);
97+
98 if (pbmap.pbm_flags & PBMF_DELAY) {
99 if (direct)
100 BUG();
101@@ -637,8 +640,6 @@
102 set_bit(BH_Delay, &bh_result->b_state);
103 }
104
105- if (create && (pbmap.pbm_flags & PBMF_NEW))
106- set_bit(BH_New, &bh_result->b_state);
107 return 0;
108 }
109
This page took 0.314732 seconds and 4 git commands to generate.