linux/fs/nilfs2/cpfile.c
<<
>>
Prefs
   1/*
   2 * cpfile.c - NILFS checkpoint file.
   3 *
   4 * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
   5 *
   6 * This program is free software; you can redistribute it and/or modify
   7 * it under the terms of the GNU General Public License as published by
   8 * the Free Software Foundation; either version 2 of the License, or
   9 * (at your option) any later version.
  10 *
  11 * This program is distributed in the hope that it will be useful,
  12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14 * GNU General Public License for more details.
  15 *
  16 * You should have received a copy of the GNU General Public License
  17 * along with this program; if not, write to the Free Software
  18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  19 *
  20 * Written by Koji Sato <koji@osrg.net>.
  21 */
  22
  23#include <linux/kernel.h>
  24#include <linux/fs.h>
  25#include <linux/string.h>
  26#include <linux/buffer_head.h>
  27#include <linux/errno.h>
  28#include <linux/nilfs2_fs.h>
  29#include "mdt.h"
  30#include "cpfile.h"
  31
  32
  33static inline unsigned long
  34nilfs_cpfile_checkpoints_per_block(const struct inode *cpfile)
  35{
  36        return NILFS_MDT(cpfile)->mi_entries_per_block;
  37}
  38
  39/* block number from the beginning of the file */
  40static unsigned long
  41nilfs_cpfile_get_blkoff(const struct inode *cpfile, __u64 cno)
  42{
  43        __u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
  44        do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
  45        return (unsigned long)tcno;
  46}
  47
  48/* offset in block */
  49static unsigned long
  50nilfs_cpfile_get_offset(const struct inode *cpfile, __u64 cno)
  51{
  52        __u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
  53        return do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
  54}
  55
  56static unsigned long
  57nilfs_cpfile_checkpoints_in_block(const struct inode *cpfile,
  58                                  __u64 curr,
  59                                  __u64 max)
  60{
  61        return min_t(__u64,
  62                     nilfs_cpfile_checkpoints_per_block(cpfile) -
  63                     nilfs_cpfile_get_offset(cpfile, curr),
  64                     max - curr);
  65}
  66
  67static inline int nilfs_cpfile_is_in_first(const struct inode *cpfile,
  68                                           __u64 cno)
  69{
  70        return nilfs_cpfile_get_blkoff(cpfile, cno) == 0;
  71}
  72
  73static unsigned int
  74nilfs_cpfile_block_add_valid_checkpoints(const struct inode *cpfile,
  75                                         struct buffer_head *bh,
  76                                         void *kaddr,
  77                                         unsigned int n)
  78{
  79        struct nilfs_checkpoint *cp = kaddr + bh_offset(bh);
  80        unsigned int count;
  81
  82        count = le32_to_cpu(cp->cp_checkpoints_count) + n;
  83        cp->cp_checkpoints_count = cpu_to_le32(count);
  84        return count;
  85}
  86
  87static unsigned int
  88nilfs_cpfile_block_sub_valid_checkpoints(const struct inode *cpfile,
  89                                         struct buffer_head *bh,
  90                                         void *kaddr,
  91                                         unsigned int n)
  92{
  93        struct nilfs_checkpoint *cp = kaddr + bh_offset(bh);
  94        unsigned int count;
  95
  96        WARN_ON(le32_to_cpu(cp->cp_checkpoints_count) < n);
  97        count = le32_to_cpu(cp->cp_checkpoints_count) - n;
  98        cp->cp_checkpoints_count = cpu_to_le32(count);
  99        return count;
 100}
 101
 102static inline struct nilfs_cpfile_header *
 103nilfs_cpfile_block_get_header(const struct inode *cpfile,
 104                              struct buffer_head *bh,
 105                              void *kaddr)
 106{
 107        return kaddr + bh_offset(bh);
 108}
 109
 110static struct nilfs_checkpoint *
 111nilfs_cpfile_block_get_checkpoint(const struct inode *cpfile, __u64 cno,
 112                                  struct buffer_head *bh,
 113                                  void *kaddr)
 114{
 115        return kaddr + bh_offset(bh) + nilfs_cpfile_get_offset(cpfile, cno) *
 116                NILFS_MDT(cpfile)->mi_entry_size;
 117}
 118
 119static void nilfs_cpfile_block_init(struct inode *cpfile,
 120                                    struct buffer_head *bh,
 121                                    void *kaddr)
 122{
 123        struct nilfs_checkpoint *cp = kaddr + bh_offset(bh);
 124        size_t cpsz = NILFS_MDT(cpfile)->mi_entry_size;
 125        int n = nilfs_cpfile_checkpoints_per_block(cpfile);
 126
 127        while (n-- > 0) {
 128                nilfs_checkpoint_set_invalid(cp);
 129                cp = (void *)cp + cpsz;
 130        }
 131}
 132
 133static inline int nilfs_cpfile_get_header_block(struct inode *cpfile,
 134                                                struct buffer_head **bhp)
 135{
 136        return nilfs_mdt_get_block(cpfile, 0, 0, NULL, bhp);
 137}
 138
 139static inline int nilfs_cpfile_get_checkpoint_block(struct inode *cpfile,
 140                                                    __u64 cno,
 141                                                    int create,
 142                                                    struct buffer_head **bhp)
 143{
 144        return nilfs_mdt_get_block(cpfile,
 145                                   nilfs_cpfile_get_blkoff(cpfile, cno),
 146                                   create, nilfs_cpfile_block_init, bhp);
 147}
 148
 149static inline int nilfs_cpfile_delete_checkpoint_block(struct inode *cpfile,
 150                                                       __u64 cno)
 151{
 152        return nilfs_mdt_delete_block(cpfile,
 153                                      nilfs_cpfile_get_blkoff(cpfile, cno));
 154}
 155
 156/**
 157 * nilfs_cpfile_get_checkpoint - get a checkpoint
 158 * @cpfile: inode of checkpoint file
 159 * @cno: checkpoint number
 160 * @create: create flag
 161 * @cpp: pointer to a checkpoint
 162 * @bhp: pointer to a buffer head
 163 *
 164 * Description: nilfs_cpfile_get_checkpoint() acquires the checkpoint
 165 * specified by @cno. A new checkpoint will be created if @cno is the current
 166 * checkpoint number and @create is nonzero.
 167 *
 168 * Return Value: On success, 0 is returned, and the checkpoint and the
 169 * buffer head of the buffer on which the checkpoint is located are stored in
 170 * the place pointed by @cpp and @bhp, respectively. On error, one of the
 171 * following negative error codes is returned.
 172 *
 173 * %-EIO - I/O error.
 174 *
 175 * %-ENOMEM - Insufficient amount of memory available.
 176 *
 177 * %-ENOENT - No such checkpoint.
 178 *
 179 * %-EINVAL - invalid checkpoint.
 180 */
 181int nilfs_cpfile_get_checkpoint(struct inode *cpfile,
 182                                __u64 cno,
 183                                int create,
 184                                struct nilfs_checkpoint **cpp,
 185                                struct buffer_head **bhp)
 186{
 187        struct buffer_head *header_bh, *cp_bh;
 188        struct nilfs_cpfile_header *header;
 189        struct nilfs_checkpoint *cp;
 190        void *kaddr;
 191        int ret;
 192
 193        if (unlikely(cno < 1 || cno > nilfs_mdt_cno(cpfile) ||
 194                     (cno < nilfs_mdt_cno(cpfile) && create)))
 195                return -EINVAL;
 196
 197        down_write(&NILFS_MDT(cpfile)->mi_sem);
 198
 199        ret = nilfs_cpfile_get_header_block(cpfile, &header_bh);
 200        if (ret < 0)
 201                goto out_sem;
 202        ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, create, &cp_bh);
 203        if (ret < 0)
 204                goto out_header;
 205        kaddr = kmap(cp_bh->b_page);
 206        cp = nilfs_cpfile_block_get_checkpoint(cpfile, cno, cp_bh, kaddr);
 207        if (nilfs_checkpoint_invalid(cp)) {
 208                if (!create) {
 209                        kunmap(cp_bh->b_page);
 210                        brelse(cp_bh);
 211                        ret = -ENOENT;
 212                        goto out_header;
 213                }
 214                /* a newly-created checkpoint */
 215                nilfs_checkpoint_clear_invalid(cp);
 216                if (!nilfs_cpfile_is_in_first(cpfile, cno))
 217                        nilfs_cpfile_block_add_valid_checkpoints(cpfile, cp_bh,
 218                                                                 kaddr, 1);
 219                mark_buffer_dirty(cp_bh);
 220
 221                kaddr = kmap_atomic(header_bh->b_page);
 222                header = nilfs_cpfile_block_get_header(cpfile, header_bh,
 223                                                       kaddr);
 224                le64_add_cpu(&header->ch_ncheckpoints, 1);
 225                kunmap_atomic(kaddr);
 226                mark_buffer_dirty(header_bh);
 227                nilfs_mdt_mark_dirty(cpfile);
 228        }
 229
 230        if (cpp != NULL)
 231                *cpp = cp;
 232        *bhp = cp_bh;
 233
 234 out_header:
 235        brelse(header_bh);
 236
 237 out_sem:
 238        up_write(&NILFS_MDT(cpfile)->mi_sem);
 239        return ret;
 240}
 241
 242/**
 243 * nilfs_cpfile_put_checkpoint - put a checkpoint
 244 * @cpfile: inode of checkpoint file
 245 * @cno: checkpoint number
 246 * @bh: buffer head
 247 *
 248 * Description: nilfs_cpfile_put_checkpoint() releases the checkpoint
 249 * specified by @cno. @bh must be the buffer head which has been returned by
 250 * a previous call to nilfs_cpfile_get_checkpoint() with @cno.
 251 */
 252void nilfs_cpfile_put_checkpoint(struct inode *cpfile, __u64 cno,
 253                                 struct buffer_head *bh)
 254{
 255        kunmap(bh->b_page);
 256        brelse(bh);
 257}
 258
 259/**
 260 * nilfs_cpfile_delete_checkpoints - delete checkpoints
 261 * @cpfile: inode of checkpoint file
 262 * @start: start checkpoint number
 263 * @end: end checkpoint numer
 264 *
 265 * Description: nilfs_cpfile_delete_checkpoints() deletes the checkpoints in
 266 * the period from @start to @end, excluding @end itself. The checkpoints
       * @end: > *
 168 * Return Value: On success2/cpfile.c#L251" id="L251" class="line" name="L269"> 169 * buffer head of the buffer 0 is returned, and the checkpoint and pan>
 170 * the place pointed by @cppeturned.
 171 * following negative error2/cpfile.c#L172" id="L172" class="lin2" name="L272"> 172 *
 173 * %-EIO - I/O error. 174 *
 175 * %-ENOMEM - Insuffici2/cpfile.c#L176" id="L176" class="lin2" name="L276"> 176 *
 177 * %-ENOENT - No such cs2/cpfile.c#L252" id="L252" class="line" name="L278"> 178 *nilfile_block_add_valid_checkpoinclass="sref">nilfie=inode" class="sref">inode *cpfile,  179 cno@end  180 cnots< 181int  182            2     2             buffer_head *header_bh, *cp_bh;
 183            2     28ef="+code=nilfs_checkpoint" class="sref">nckpoins_cpfile_header *header;
 184            2     2             sfs_checkpoint" class="sref">nilfs_checkpoint *cp;
 185            2     28de=kunmap" class="sref">kunm_t cpsz = NILFS_MDT(cpfile)->mi_entry_size;
 186{
brel cno,
 187        stru2t kaddr;
 188        stru2t kaddrtni=NI
 189        stru2t ret;
 190        void2* 191        int 2a hre2="+code=ret" cly" class="sref">unlikely(cno@end cno@end  192
headprlasile_get_checkpoiprlasiclass="sref">cnoKERN_ERRle_get_checkpoiKERN_ERRclass=#37;-ENOENT fs_ing">"eckpos:n>

 193        if (2a hre29             struct "[eckpollu, eckpollu)\n"2/cpfillass="sref">__u64 194            2     2  (cp +@end cp +ts< 195            2   re2urn -EINVAL;
 196
 197         198
updown_write(&NILFS_MDT(cpfile)->mi_sem);
 199         200        if (3a hre3="+code=ret" c="sref">ret;
nilfs_cpfile_get_header_block(cpfile, &header_bh);
 201            3   go30"+code=ret" cly" class="sref">un < 0)
 202        out_sem;
 203        if (3a hre3="+code=ret" css="sref">kaddrtni=NI
 194            3   go3o  195            3ef="+30cpfile.c#L156" id="L156" class="lin3" name="L306"> 206        cno < creat< creat<  207        if (3a hre30ref="+code=nilfs_mdt_mark_dirty" clas=NI
nins_cpfile_checkpoints_per_block(cpfile, &cno,
 198
ret;
nilfs_cpfile_get_checkpoint_block(cpfile, cno, cp_bh);
 209            3     3     un < 0)
 210            3     3     un < 0)
ENOENT;
 211            3     3      212            3     3     goto  213            3   }
3a href="fs/nilfs2/cpfide=creat="sref">ret;
 214            3   /*         continuele.c#L202" id="L202" class="lin3"5name="L315"> 215            3    216            3   if31cpfile.c#L237" id="L237" class="lin3" name="L317"> 217            3     3     kaddr;
kmap_atomic(h->b_page);
 218            3     3                      "sref">cp;
nilfs_cpfile_block_get_checkpoint( 219            3   cp;
, &cno,
kaddr);
 220
 221            3   cnoi*cp +cpsz =  222            3   nilsnapshockpoint *h 223            3     3                                     224            3   nilfs_checkpoint_invalid(cp)) {
 225            3   (cp)) {
 226            3    227            3    228        }
 229
uncl=NI
 230        if (3a hre33    breltni=NI
 231            3   *<3 href="+code=cpp" claselse" class="sref">brel"sref">mark_buffer_dirty(cp_bh);
 232        *nilfs_mdt_mark_dirty(cpfile);
 233
nilfs_cpfile_is_in_first(cpfile, cno))
 234  235        nilfs_cpfile_block_add_valid_checkpointssub="sref">nilfs_cpfie" cle.c#L210" id="L210" class="lin3" name="L336"> 236
, cno)/a>, kaddr);
 237 cpp  238         239        retu3n kunmap_atomic(kaddr);
 240}
(cp_bh);
 241
 242nilfs_cpfile_get_checkpoint_block(class="sref">nilfs_cpfie" cle.c#L210" id="L210" class="lin3" name="L343"> 243, cno))
 244un < 0)
 245 246unprlasile_get_checkpoiprlasiclass="sref">cnoKERN_ERRle_get_checkpoiKERN_ERRclase.c#L202" id="L202" class="lin3" name="L347"> 247"eckpos:ncannot>
 248cno 249 250 251 252void  253            3     35cpfile.c#L234" id="L234" class="lin3" name="L354"> 254{
kunmap_atomic(kaddr);
 255        (cp_bh);
 256         257}
 258
untni=NI
 259 = kmap_atomic(header_bh->b_page);
 260 = nilfs_cpfile_block_get_header(cpfile, header_bh,
 261 =  262head">le64_add_cpu(&header->ch_ncheckpoints, 1);
unl> cp +tni=NI
 263brel"sref">mark_buffer_dirty(cp_bheader_bh);
 264nilfs_mdt_mark_dirty(cpfile);
 265kunmap_atomic(kaddr);
 266 * @end: > *
 168upse(header_bh);
 169uncsI
 170ENOENBUSY- 171 172 *out_sem:
 173kaddr_write(&NILFS_MDT(cpfile)->mi_sem);
 174ret;
 175 * le.c#L258" id="L258" class="lin3" name="L376"> 176 177 * static _cpfile_put_checkpoint" class="srsref">nilfstolasinf
nilfstolasinf
e" clde" class="sref">inode *cpfile,  178nilfs_checkpoint *cp;
 179nsinf
cp;
 180 181int kaddrcpfile href="fs/nilfs2/cpfiheckpoints" class="srp_flagpoints, 1);
 182            3     3             kaddr(&cpfile href="fs/nilfs2/cpfiheckpoints" class="srp_))
 183            3     38"+code=ret" css="sref">kaddrfs_cpfile_block_get_heleef=tolascpu(&cpfile href="fs/nilfs2/cpfiheckpoints" class="srp_)e) {
 184            3     38 cpfile href="fs/nilfs2/cpfiheckpoints" class="srp_nblk_inomic( 185            3     38de=kunmap" class="sref">kunm(&cpfile href="fs/nilfs2/cpfiheckpoints" class="srp_=cpficla 186{
brel(&cpfile href="fs/nilfs2/cpfiheckpoints" class="srp_ref="cla 187        stru3t (&cpfile href="fs/nilfs2/cpfiheckpoints" class="srp_snapshoc_lifile_is_in_first 188        stru3t  189        stru3t  190        void3*cpsz(coef="+csinf
inode *cpfile, brel cpfilnoe href="fs/nilfs2noecpfile.c#L252" id="L252" class="lin3" name="L391"> 191        int 3a hre39    kaddrbuf(brel_t cpsz 192
 193        if (3a hre39             fs_checkpoint" class="sref">nilfs_checkpoint *cp;
 194            3     3  (nsinf
cp;
 195            3   re3urn -buffer_head *bh)
 196
brel_t cpsz = NILFS_MDT(cpfile)->mi_entry_size;
 197         cno,ur_))
Ncpfile)->cno))
cpfilnoe href="fs/nilfs2noecpfile.c#L125" id="L190" class="lin3" name="L398"> 198
kaddr;
 199        retnbrel;
 200        if (4a hre4="+code=ret" class="sref">retn=NI
 201            4   go40cpfile.c#L242" id="L242" class="lin4" name="L402"> 202        cpp )
 203        if (4a hre40                     NVAL" class="sref">EINVAT;

 194            4   go4o NILFS_MDT(cpfile)->mi_sem);
 195            4ef="+40cpfile.c#L156" id="L156" class="lin4" name="L406"> 206        cnonretncreat<  207        if (4a hre40ref="+code=nilfs_mdt_mark_dirty" clas=NI
nins_cpfile_checkpoints_per_block(cpfile, &cno,
 198
ret;
nilfs_cpfile_get_checkpoint_block(cpfile, cno, cp_bh
 209            4     4     un < 0)
 210            4     4     un < 0)
ENOENT;
 211            4     4     out_se;
 212            4     4     goto  213            4   }
4a href="fs/nilfs2/cpfile.c#L258" id="L258" class="lin4" name="L414"> 214            4    215            4   kaddr;
kmap_atomic(hgt;b_page);
 216            4   if41ref="+code=mark_buffe"sref">cp;
nilfs_cpfile_block_get_checkpoint(cpfile, &cno,
kaddr);
 217            4     4     cnoi*retncreai*cp +cpsz =  218            4     4                              _cpfile_is_in_first" class="sref">nilfs_checkpoint_invalid(cp)) {
 219            4   cp;
nt" class="srsref">nilfstolasinf
nilfstolasinf
e" class="sref">cpfile, &cno,a href="fs/nilfs2/cpfile.c#L252" id="L252" class="lin4" name="L420"> 220
cp;
 221            4   cp;
cp +cpsz 222            4   cp;
n 223            4     4                              le.c#L258" id="L258" class="lin4" name="L424"> 224            4    225            4   kaddr<">kunmap_atomic(kaddr);
 226            4   h
 227            4    228        }
 229
ret;
 230        if (4a hre43    unc 231            4   *<4 href="+code=cpp" clas"sref">cp;
cp +cpsz 232        *cpfilnoe href="fs/nilfs2noecpfipfile_get_header_b 233
 234  235        out_se;
 236
brelup+rhead *NILFS_MDT(cpfile)->mi_sem);
 237 ret;
 238         239        retu4n  240}
cpsz(coef="+==cnf
inode *cpfile, brel cpfilnoe href="fs/nilfs2noecpfile.c#L252" id="L252" class="lin4" name="L441"> 241
kaddrbuf(brel_t cpsz 242 243bh)
 244nss="srs_cpfile_header *header;
 245nilfs_checkpoint *cp;
 246nsinf
cp;
 247 cno,ur>;
cpfilnoe href="fs/nilfs2noecpfilckpoint" class="sexpa href="fs/nilfnexpfs_cle.c#L190" id="L190" class="lin4" name="L448"> 248kaddr,ur>_blkoff( 249kaddr;
 250retnret;
 251 252void kaddref="+rhead *NILFS_MDT(cpfile)->mi_sem);
 253            4     45cpfile.c#L234" id="L234" class="lin4" name="L454"> 254{
cpp ur>;
 255        nilfs_cpfile_get_header_block(cpfile, &h
 256        un < 0)
 257}
out_se;
 258
ret;
kmap_atomic(hgt;b_page);
 259 = nilfs_cpfile_block_get_header(cpfile, hgt;kaddr);
 260;
(&cpfier-> 261kaddr);
 =  226            4     254{
cp4bhead4r_bh);
 213            3   }4a>(c4file);
 257}
46="sref">h
4266h
nilfs_checkpoint_invc#L258" i4="L258" class="lin3 clas4="c3m46ur_))
 213            3   }4at; 257}
;
ENOENBUSY- 248lin4" name="L455"> 255        <44             unsigna255        <44    f="+code=nilfs_cpfile_block_get_header" class="sref">nilfs_cpfile_blele.c#L234" id="L234" classhref="+code=mark_buffecno" class=> *o4t_sem:
 198
ret;
nilfs_cpfile_get_chele.c#L234" id="L234" classf="+code=cpfile" class="sref">cpfile, cnom47> 253            4     45cpfenlikellass="lin3" nameenlikellf="+code=nilfs_cpfil57" id="L257" class="lin4" name=" class="sref">nilfs_checkpoint_inv class=3c4mme37ref="+code=le" clas4="sre47ile);
 244 210            4     4     un #L240" id4"L240" class="lin3" name4"L37547"+code=brfiiiiiiiiiiiiiiicontfur_))
FS_Mile.c#L239" id="L239" class="lin"LL191" id="L191" class="linNo sce" clas (started from aame="Ls/nil)L412"> 212            4     4     gotc#L258" i4="L258" class="lin3" nam4="L3747n < 0)
 257}
4pfile, ;
 258
ret;
kmap_atomic(hinf
nilfs_checkpoint_inv#L236" id4"L236" class="lin3" name4"L38048>unc 216            4   if41ref="+code=mark_buffe"sref">cp;
nilfs_cpfile_block_gle.c#L234" id="L234" classf=nilfs_cpfile_block_get_header(cpfile,  212            4     4     gotle href="4s/nilfs2/cpfiheckpoints"4class48+tni=NI
 218            4     4                              _cpfile_is_in_first" ||            4     4     gotlt;);
 222            3   un s/nilfs2/4pfiheckpoints" class="sr4_nblk48ile);
 24/cpfiheck4oints" class="srp_=cpfic4a);
 219            4   cp;
nt" class="srsref">nilfstolasinf
 220
 221            4   cp;
cst 222            4   );
cno,ur>;
(&cpfile href="fs/nilfs2/cpfiheckpoints" class="srp_snapshoc_lifile_is_in_fi4c#L258" i4="L258" class="lin3" nam4="L3849ddr);
cno,ur>;
 202       el cpfilnoe href="fs/nilfs2noed="L21L191" id="L191" class="lin="Lch end of the sce" cla ce" L412"> 212            4     4     gotrel_t4cps            4     4     gotre href="4"L236" class="lin3" name4"L39249+tni=NI
 255        <44             unsigna255        <44    f="+code=nilfs_cpfile_block_get_header" class="sref">nilfs_cpfile_blMs="sref">cno,ur>;
 248l!in4" name="L455"> omme44             unsigna hlopoiss="sre class="sref">nilfs_checkpoint_inv>cp;
4i* 261kaddr);
 226            4   m4_entr49n < 0)
 198
ret;
nilfs_cpfile_get_chMs="sref">cno,ur>;
br))
cpfile, cno)) {
nilfs_checkpoint_in5ref">ret<5a>ncno,a href="fs/nilfs2/cpfile.code=nilfs_cpfilWARN_ON id="L257" clasWARN_ONf="+code=nilfs_cpfil57" id="L257" class="lin4"an "> 210            4     4     cnoret 211            4     4     ;
cp5 )
 258
ret;
kmap_atomic(5lfs2/cpfi5 a newly-created checkpo5n hre50_bh);
m50ur>;
 2ss="sref">cno,ur>;
 248lin4" name="L455"> omme44             unsigna hlopoiss="sref">kaddr,ur>_blkoff(h
 * @end: > *
 261kaddr);
,  226            4   u5 < 0)
 232#L207" id="L207" class="liref="+code=mark_buffecno" class5 ">ret51 180 229
cps            4     4     go5o  21="L258" class="lin4" name="L4355 class="l5n4" name="L413"> 2135     51"fs/n/nilfsheckpo>
 236
brelup+rhead *NILFS_MDT(cpfile)-5c#L258" i5="L258" class="lin4" nam5="L415"> 214    href="fs/nilfs2/cpfile.c#L239" id="L239" class="lin4" name="L437"> 237 b5page51 +5psz 212            4     4     go5alid(5a href="+code=cp" class=5sref"5cp191" id="L191" class=" * t="sref">ret;
      ">"> 212            4     4     go5cpfilecn191" id="L191" class=" * @  4   :>"> 212            4     4     go5c">retcp"> 212            4     4     go5cref="+co5cpsz<191" id="L191" class=" * @ i:>"> 212            4     4     go5c cp<191" id="L191" class=" * @n i:>"> 212            4     4     go5cclass="l5="L423"> 223        5   4 5   4  191" id="L191" class=" *12"> 212            4     4     go5 class="l5n4" name="L424"> 2245     52sem);
5addrcpfile hrcpfile.c#L230" id="L230" class="lin4" name="L440"> 240}
   void3* cpsz(coef="+csinf
inode *cpfile, cpsz(coef="+code=__u64" cllass="sref">b5"srege 241
kaddrbuf(5d="L257" 5lass="lin4" name="L427">5227     lass="sref">nilfs_checkpoint_in5c#L258" i5="L258" class="lin4" nam5="L425"> 228    switch      4     45cpfmref">cpsz(coe class="sref">nilfs_checkpoint_in5ef">ret;
 21="L258" class="lin4" name="L4355 if (4a h5e43    unccp;
nt" class="srsref">nilfstolasinf
  241
 237  +cpsz 21="L258" class="lin4" name="L4355  cp;
nt" class="srsref">nilfstolasinf
  241
 237 5233;
 237  2355       out_se;
href="fs/nilfs2/cpfile.c#L257" 5gt;m5_sem191" id="L191" class="li*2"> 212            4     4     go5c#L258" i5="L258" class="lin4" nam5="L4354f">cn191" id="L191" class=" * c oints" classelet"+code=mark_ ">"> 212            4     4     go5el  212            4     4     go5rel_t5 212            4     4     go5#L236" id5"L236" class="lin4" name5"L44254">cp<191" id="L191" class=" *12"> 212            4     4     go5r_headbhcpsz(coef="+csinf
inode * <5a> *5eadernilfs_checkpoint_in5kpointcp;
s44     237 cp;
5i* < 237 ="L257" 5ref="fs/nilfs2noecpfilck5oint"54nt"> * @end: > *
 237 L240" id5offcpfilckpoint" class="5exp_b54 238        ;
 198
cp;
nt" class="srsref">nilfstolin4" name="L436"> 23tfleblock_init"  23"+de=ret" classssssass=, 30" ofe_buffe"sref">cp<
 237 retn5a href="fs/nilunc 256         237 m55/a> )
cpfile +colass="sref">cpfilnoe href="fs!in4" name="L455">fleblock_init"  <5c#L239" i5="L239" class="lin4" nam5="L4555_bh);
5c> *5pp;
 222        me="L"" name="ss="lin4" name="L436"> 23<
5cpointh
5ccp;
5ode=mark_buffely" class=5sref"55out_se;
fs2/cpfs/nilfs2/cpfilec oints" classelet"+code=mark_forss="sref">cno< oints" classelet"+code=mark_fa hre_buffe"sref">cp;
nt" class="srsref">nilfstolasinf
 <N 237 L240" id5="+code=b_page" class="s5ef">b5pagehgt;<5 href="+code=b_paglass="5ref">5addrn5shoc_lificpfi.oints" cla5s="ss5l_nexp   href="fs/nilfs2/cpfile.c#L19t_heleef=tolascpu(&<.c#L19t_heleef=tola(coef=ref="fs/nilfs2/cpfile.c#L257" 5e#L240" i5e=nilcode=mark_buffer_di5ty" c5ass=;
(&<.c#L19s" clas/a>;
cpsz(coef="+csinf
inode * <cp5bhead5r_bh);
 243 *c5file);
5(56="srelass="sref">nilfs_checkpoint_in5d="L226" 5lass="lin3" name="L366">5266h
 244nss="srs_cpfile_header<5c#L258" i5="L258" class="lin3 clas5="c3m56ur_))
 245nilfs_che5at;(&<.c#L19t_heleef=tola(coef=s/nilfs2/cpfiletolascpu(&nilfs_che5ss=3comme56ef="+code=nilly" class=5sref"57ddrunc 254{
 216            4   if41ref="+code=mark_buffe"sref">cp;
nilfs_cpfile_block_get_checkpoint(cpfile, &cno,
 *o57+tni=NI
 23<_nexpa href="fs/nilfsi_nexpfs_cpfile_block_get_heleef=tolascpu(&#L239" i5="+code=mi_sem" class="s5ef">m57> 253    hi++le. name="L454"> 254{
 * 259 = nilfs_cpfile_block_get_header(cpfile, ((& 23nit" ,ur>;
(&h
57ref">out_se;
fs2/cpfs/nilfs2/cpfiletolascpu(&nilfs_che5st;   href="fs/nilfs2/cpfi oints" classe4"" name="L322"> 222        " classe4"" name="a href="+code==cpsz" class="sref">cpsz(coef="+csinf
inode * <5ref="fs/n5lfs2/cpfiheckpoints" cla5s="sr58">cpsz 243);
 244nss="srs_cpfile_header<5s/nilfs2/5pfiheckpoints" class="sr5_nblk58ile);
 245nilfs_che5/cpfiheck5oints" class="srp_=cpfic5acp;
nilfs_che5/cpfiheck5oints" class="srp_ref="c5a 247nilfs_che5/#L258" i5shoc_lificpfi.oints" cla5s="ss58lass="sexpa href="fs/nilfnexpfs_cle.c#L190" id="L190" class="lin4" name="L448"> 248nilfs_che5/t;);
 249 237  5 202      5re href="5"L236" class="lin3" name5"L39259+tni=NI
 212            4     4     go5ct; 236
brelup+rhead *NILFS_MDT(cpfile)-5>cp;
5i* 198
ret;
nilfs_cpfile_get_chget_checkpoint(cpfile)-5>cpfiheck5try_size" class="sref">m5_entr59n < 0)
 256        ))
( 237  228        }
 258
ret<=p"Lck_get_headerkmap_atomic(6ref">ret<6a>n;
 216            4   if41ref="+code=mark_buffe"sref">cp;
nilfs_cpfile_block_get_checkpoint(cpfile, ret 24" name="L418"> 218            4     4                              _cpfile_is_in_first"4" name="L454"> 254{
6 cp6 )
 261kaddr);
);
6 5s2/cpfi6 *m60ur>;
 24"" name="L322"> 222            3    254{
m6et_he60er_bl=NI
 213            3   }6
 261kaddr);
)) {
6     u61ncsI
;
ret61 180 261kaddr);
cps            4     4     go6o :
 198
nilfs_cpfile_get_heat" ;
kaddr);
 2136     61"fs/n/nilfshe/nilfs2/cpfile.c#L257" id="L257" class="lin4" name="L456"> 256        6 #L239" i6="+code=b_page" class="s6ef">b61"+code=brfiii="fs/nilfs2/cpfc#L191" id="L191" class="lin4" name="L458"> 258
retkmap_atomic(6="sregt;<6 href="+code=b_paglass="6ref">61k_get_hebuf( 259 = nilfs_cpfile_blt" ;
kaddr);
61nt"> * @end: > *
(& 23nit" ,ur>;
(&(6a href="+code=cp" class=6sref"61> 228        }
 259;
kaddr);
ret 213            3   }6cref="+co6, 1);
 248lin"L313"> 213            3   }6c :
kaddr);
 223        6   4 62"fs/n/nilfshewh"sr href="fs/nil < 254{
 2246     62ile);
 255        <44             unsigna255        <44    f="+code=nilfs_cpfile_block_get_header" class="sref">nilfs_cpfile_blprevk_get_headerkaddr);
62age);
nilfs_che6"srege 248l!in4" name="L455">prev"LL190" class="lin4" nprev"LL190"(coer" name="L454"> 254{
6227,  261kaddr);
 226eme="Lck_get_headerkaddr);
ret;
cno,a href="fs/nilfs2/="fs/nilfs2/cpf.c#L239" id="L239" class=lin4"8name="L408"> 198
ret;
nilfs_cpfile_get_chg447"> 247kaddr);
retunckaddr);
 256        ;
nilfs_che6pclass="l6lass="lin4" name="L433">6233);
 258
ret<=me="Lck_get_headerkmap_atomic(6 class="l6="L258" class="lin4" nam6="L4363ur>;
 2356       );
 248lin4" name="L455">prev"LL190" class="lin4" nprev"LL190"(coead" class="sref"sref">nilfs_che6gt;m63er_bl=NI
 216            4   if41ref="+code=mark_buffe"sref">cp;
nilfs_che6gnilfs_cpfile_get_chg447"> 247kaddr);
);
 23<_nexpa href="fs/nilfsi_nexpfs_cpfile_block_get_heleef=tolascpu(&cno,a href="fshref="fs/nilfs2prevk_get_headerkaddr);
 ;
 261kaddr);
cp<02" 8s="sref">kaddr);
 254{
 *64ile);
 198
ret;
nilfs_cpfile_get_chprevk_get_header 254{
6 * 23prev"Lck_get_headerkaddr);
 256        ="L257" 6ref="fs/nilfs2noecpfilck6oint"64file,  247 254{
cno,a href="fshref="fs/nilfs2prev"Lck_get_header 259retn6a href="fs/nilunckaddr);
m65">cp<02" 8s="sref">kaddr);
 258
ret<=me="Lck_get_headerkmap_atomic(6c> *6pp;
(& 216            4t_heleef=tolascpu(&<.c#L19s" clas/a>;
6c 2356;h
nilfs_cpfile_get_chg447"> 247kaddr);
;
6ode=mark_buffely" class=6sref"65k_get_hebuf(ret<=leblock_init"  <kaddr);
 * @end: > *
 261kaddr);
L240" id6="+code=b_page" class="s6ef">b65 238        hgt;<6 href="+code=b_paglass="6ref">66addr;
 258
ret<=p"Lck_get_headerkmap_atomic(6eretn6shoc_lificpfi.oints" cla6s="ss66 180 216            4   if41ref="+code=mark_buffe"sref">cp;
nilfs_cpfile_block_get_checkpoint(kaddr);
, 1);
cpfile kpoiss="sref">cno,ukpoiss="+csi9ef="+code=bufle_bfpuc=cpcodelock" class="srefuc=cpcodede=creat="sref">ret<=447"> 247kaddr);
:
(&cpfile kpoiprevk_get_headerretkaddr);
cp6bhead66_bh);
 222            3   kaddr);
 *c66ur>;
 261kaddr);
(66="sre02" 8s="sref">kaddr);
;
6lass="lin3" name="L366">6266 258
retkmap_atomic(6e="L257" 6="L258" class="lin3 clas6="c3m66nt"> * @end: > *
(& 216            4t_heleef=tolascpu(&<.c#L19s" clas/a>;
6at;nilfs_cpfile_get_chprevk_get_headerretkaddr);
;
cno,ukpoiss="+csi9ef="+code=bufle_bfpuc=cpcodelock" class="srefuc=cpcodede=creat="sref">ret<=leblock_init"  <kaddr);
 261kaddr);
cps            4     4     go6> *o67_sem:
 258
retkmap_atomic(6>#L239" i6="+code=mi_sem" class="s6ef">m67_bh);
 259 = nilfs_cpfile_blt" ;
kaddr);
 * 23nit" ,ur>;
cnoeefnt_heleeff+csinf1r"lin4" name="L437"> 237 ( 261kaddr);
;
6="L258" class="lin3" nam6="L376767nt"> * @end: > *
kaddr);
kaddr);
cpfile)-6#L236" id6"L236" class="lin3" name6"L38068 180kaddr);
kaddr);
cp<02" 8s="sref">kaddr);
);
 226prev"Lck_get_headerkaddr);
cp 247 226eme="Lck_get_headerkaddr);
;
 226t" ;
kaddr);
 6:
 226ep"Lck_get_headercpfile)-6ct;cpfile)-6c/nilfs2/6i*( 236
brelup+rhead *NILFS_MDT(cpfile)-6>cpfiheck6try_size" class="sref">m6_entr69n < 0)
 237 ))
        ret<7a>n   href="fs/nilfs2/cpfi oints" clasclear"" name="L322"> 222        " clasclear"" name="e" clf="+code==cpsz" class="sref">cpsz(coef="+csinf
inode * <7f">ret 254{
 243cp70 242 244nss="srs_cpfile_header<7lfs2/cpfi7 a newly-created checkpo7n hre70_bh);
 245nilfs_che7 5s2/cpfi7 *m70ur>;
(&<.c#L19t_heleef=tola(coef=s/nilfs2/cpfiletolascpu(&nilfs_che7c#L239" i7="L239" class="lin4"5nam7="L4070"+code=brfiii="fs/nilfs2/cpf="sref">inode *cno,uss="+csinf
e" clde" classprevk_get_headernilfs_che7c7L239" i7=ry_size" class="sref">m7et_he70er_bl=NI
 249 237         u71ncsI
 202      7 ">ret71>unc 212            4     4     go7href="+co7e=ret" classssssssssem" 7lass=71flagpoints, 1);
 236
brelup+rhead *NILFS_MDT(cpfile)-7o cp<02" 8s="sref">kaddr);
 2137     71_bh);
 198
ret;
nilfs_cpfile_get_chget_checkpoint(cpfile)-7c#L258" i7="L258" class="lin4" nam7="L4171ile);
 256        b71="sref">h
( 237 71k_get_hebuf( 258
ret<=p"Lck_get_headerkmap_atomic(7h71nt"> * @end: > *
 216            4   if41ref="+code=mark_buffe"sref">cp;
nilfs_cpfile_block_get_checkpoint(kaddr);
(7a href="+code=cp" class=7sref"71> 228     24" name="L418"> 218            4     4                              _cpfile_is_in_first"4" name="L454"> 254{
cno,a href="fshref="fs/nilfs2.c#L239" id="L239" class=linDT=_ile.c#L211" id="L211" class="lin4" name="L40ef="+code=iILFS_Mllass="sref">7c">retunc 261kaddr);
7c :
;
 223        7   4 72"fs/n/nilfshe 24"" name="L322"> 222            3    254{
 2247     72ile);
 213            3   }7c#L239" i7ef="+code=kaddr" class="7ref">72age);
 261kaddr);
7c7227, ;
ret;
 23<_nexpa href="fs/nilfsi_nexpfs_cpfile_block_get_heleef=tolascpu(&retcno,uss="+csi 3ref="+code=bufle_block_init" cno,ukpoiss="+csire02" 8s="sref">kaddr);
, 1);
kaddr);
 261kaddr);
7233cpfile)-7 class="l7="L258" class="lin4" nam7="L4373ur>;
 198
nilfs_cpfile_get_heat" ;
kaddr);
 2357       );
 256        m73er_bl=NI
7gcno,uss="+csi !lin4" name="L454"> 254{
);
 198
ret;
nilfs_cpfile_get_chss="sref">cno,uss="+csinf"+name="L454"> 254{
cno,a href="fsssssssssssssssssssssssssssssssssssssssssnilfs_cpfile_get_heass="a ck_get_headerkaddr);
  256        7;
nilfs_che7#L236" id7"L236" class="lin4" name7"L44274_sem:
 254{
 259 *74ile);
kaddr);
7 * 254{
="L257" 7ref="fs/nilfs2noecpfilck7oint"74file,  198
ret;
nilfs_cpfile_get_chprevk_get_header 254{
 23prev"Lck_get_headerkaddr);
cno,a href="fs        4     45cpf57" id="L257" class="lin4" name="L456"> 256        retn7a href="fs/nilunccno,uss=Iss="+csihref="+code=header_bh" class=f=7c#L240" i7="L240" class="lin4" nam7="L4575cpsz 254{
m75/a> )
 259kaddr);
 *7pp;
;
kaddr);
;
7ode=mark_buffely" class=7sref"75k_get_hebuf( 258
retkmap_atomic(7c="L257" 7e=nilfs_mdt_ccccccccem" 7lass=75nt"> * @end: > *
(& 216            4t_heleef=tolascpu(&<.c#L19s" clas/a>;
7>L240" id7="+code=b_page" class="s7ef">b75age);
nilfs_cpfile_get_chss="sref">cno,uss="+csinf
e" clde" classss="a ck_get_headerkaddr);
hgt;<7 href="+code=b_paglass="7ref">76addr;
retkaddr);
n7shoc_lificpfi.oints" cla7s="ss76 180 261kaddr);
cps            4     4     go7et;:
 258
retkmap_atomic(7e#L239" i7e=cp_bh" class="sref">cp7bhead76_bh);
(& 216            4t_heleef=tolascpu(&<.c#L19s" clas/a>;
7e> *c76ile);
nilfs_cpfile_get_chprevk_get_headerretkaddr);
7ef="+code=kaddr" class="7ref">76"+code=brfiii="fs/nilfs2/cpftolascpu(&cno,ukpoiss="+csi9ef="+code=bufle_bfpuc=cpcodelock" class="srefuc=cpcodede=creat="sref">retcno,uss="+csire02" 8s="sref">kaddr);
;
7lass="lin3" name="L366">7266 261kaddr);
 258
ret<=p"Lck_get_headerkmap_atomic(7ss=3comme76ef="+code=nilly" class=7sref"77addr;
 216            4   if41ref="+code=mark_buffe"sref">cp;
nilfs_cpfile_block_get_checkpoint(kaddr);
cpfile kpoiss="sref">cno,ukpoiss="+csi9ef="+code=bufle_bfpuc=cpcodelock" class="srefuc=cpcodede=cr0re02" 8s="sref">kaddr);
(&cpfile kpoiprevk_get_headerkaddr);
 *o77_sem:
 222            3   kaddr);
m77_bh);
 261kaddr);
 *( 258
retkmap_atomic(7ccp;
7="L258" class="lin3" nam7="L3777k_get_hebuf( 259 = nilfs_cpfile_blt" ;
kaddr);
77nt"> * @end: > *
 23nit" ,ur>;
cnoeefnt_heleeff+csinf-1r"lin4" name="L437"> 237  261kaddr);
kaddr);
kaddr);
kaddr);
:
cpfile)-7lt;);
kaddr);
kaddr);
kaddr);
 226prev"Lck_get_headerkaddr);
cno,uss=Iss="+csi="L258" class="lin4" name="L4357c#L258" i7="L258" class="lin3" nam7="L3879addr;
 226ss="a ck_get_headerkaddr);
 7;
:
 226t" ;
kaddr);
cpfile)-7c/nilfs2/7i* 226ep"Lck_get_headercpfile)-7>cpfiheck7try_size" class="sref">m7_entr79))
( 228        }
 236
brelup+rhead *NILFS_MDT(cpfile)-8ref">ret<8a>n;
 237 retcps            4     4     go8 cp80 242<191" id="L191" class="li*2"> 212            4     4     go8lfs2/cpfi8 a newly-created checkpo8n hre80_bh 212            4     4     go8l5s2/cpfi8 *m80ur>;
191" id="L191" class=" * @  4   : k ofncode=mark_ p+rhea> 212            4     4     go8l6s2/cpfi8 *m8et_he80er_bl191" id="L191" class=" *ea> 212            4     4     go8l8s2/cpfi8 ref="fs/nilfs2/cpfDT"la8s="sr80ur_))191" id="L191" class=" * Description:ea> 212            4     4     go8l9s2/cpfi8 9de=up_write" r" class=8ass="80 238<191" id="L191" class=" *ea> 212            4     4     go8     u81ncsI
191" id="L191" class=" * Rs2/cpfValu : On success, 1 is fs2/cpeds   thencode=mark_ specifiedsbyea> 212            4     4     go8 ">ret81>unc<191" id="L191" class=" * @ no is a t_heleef, or 0 if not. On error, on> ofnthenfollowing negativhea> 212            4     4     go8href="+co8e=ret" classssssssssem" 8lass=81flagp191" id="L191" class=" * error pfils is fs2/cped.ea> 212            4     4     go8h 2138     81_bh 212            4     4     go8h5s2/cpfi8="L258" class="lin4" nam8="L4181ur>;
191" id="L191" class=" *ea> 212            4     4     go8h6s2/cpfi8="+code=b_page" class="s8ef">b81"+cod191" id="L191" class=" * %-ENOMEM - Insufficiass amouss ofnmemory availab   ea> 212            4     4     go8h7s2/cpfi8 href="+code=b_paglass="8ref">81er_bl191" id="L191" class=" *ea> 212            4     4     go8h81ur_))191" id="L191" class=" * %-ENOENT - No suchncode=mark_ ea> 212            4     4     go8h9s2/cpfi8a href="+code=cp" class=8sref"81 238<191" id="L191" class=" *12"> 212            4     4     go8cpfilecnhref="fs/nilfs2/cpfi oints" clasi19t_heleefode=mark_buffer_dirty" classi19t_heleefe" clf="+code==cpsz" class="sref">cpsz(coef="+csinf
inode * <8c">retunc< name="L454"> 254{
 243 245nilfs_che8cfs2/cpfi8="L423"> 223        8   4 82"fs/n/nilfshe+codesexp_blkofffs_cle.c#L190" id="L190" class="lin4" name="L449"> 249 2248     82ile);
 237 82="sre02" 8s="sref">kaddr);
 212            4     4     go8c8227.*12"> 212            4     4     go8c9s2/cpfi8="L258" class="lin4" nam8="L4282> 228     < 259brelup+rhead *8ef">ret;
cno,a href="fsfs2/cpfDT=_ile.c#L211" id="L211" class="lin4" name="L40ef="+code=iILFS_Mllass="sref">8e">ret 236
brelup+rhead *NILFS_MDT(cpfile)-8eref="+co8cps            4     4     go8   198
ret;
nilfs_cpfile_get_chget_checkpoint(cpfile)-8efs2/cpfi8lass="lin4" name="L433">8233 256        (8e#L239" i8        258
retkmap_atomic(8gt;m83k_get_hebuf( 216            4   if41ref="+code=mark_buffe"sref">cp;
nilfs_cpfile_block_get_checkpoint(kaddr);
 218            4     4                              _cpfile_is_in_first"402" 8s="sref">kaddr);
);
8c#L258" i8="L258" class="lin4" nam8="L4384f">cno,a ="lief="+code=iILFS_Mllass="sref">8c">ret 198 24"" name="L322"> 222            3   8cref="+co8 261kaddr);
:
 226Lck_get_headercpfile)-8#class="l8 *cpfile)-8a> *84sem( 236
brelup+rhead *NILFS_MDT(cpfile)-8#t; 237 ="L257" 8ref="fs/nilfs2noecpfilck8oint"84file;
 212            4     4     go8>retn8a href="fs/nilunc<191" id="L191" class=" * ffe"sref">cp - changpncode=mark_ m/a>(c> 212            4     4     go8>ref="+co8="L240" class="lin4" nam8="L4585flagp191" id="L191" class=" * @  4   : k ofncode=mark_ p+rhea> 212            4     4     go8gt;m85 242<191" id="L191" class=" * @ no:ncode=mark_ numberea> 212            4     4     go8c#L239" i8="L239" class="lin4" nam8="L4585_bhus: m/a> ofncode=mark_ea> 212            4     4     go8c> *8pp;
191" id="L191" class=" *ea> 212            4     4     go8c 2358;() changpsnthenm/a> ofnthencode=mark_ea> 212            4     4     go8ct;b85 238<191" id="L191" class=" * Rs2/cpfValu : On success, 0 is fs2/cped. On error, on> ofnthenfollowingea> 212            4     4     go8ef">hgt;<8 href="+code=b_paglass="8ref">86ncsI
191" id="L191" class=" * negativh error pfils is fs2/cped.ea> 212            4     4     go8eretn8shoc_lificpfi.oints" cla8s="ss86>unc<191" id="L191" class=" *ea> 212            4     4     go8eref="+co8e=nilcode=mark_buffer_di8ty" c86flagp191" id="L191" class=" * %-EIO - I/O error.ea> 212            4     4     go8et;cp8bhead86_bh 212            4     4     go8e> *c86ur>;
191" id="L191" class=" *ea> 212            4     4     go8e 2358ef="+code=kaddr" class="8ref">86"+cod191" id="L191" class=" * %-ENOENT - No suchncode=mark_ ea> 212            4     4     go8ecp;
8lass="lin3" name="L366">8266 212            4     4     go8e="L257" 8="L258" class="lin3 clas8="c3m86     href="fs/nilfs2/cpfi oints" claschangp="+code=mark_buffe"sref">cpe" clf="+code==cpsz" class="sref">cpsz(coef="+csinf
inode * <e" c402" 8s="sref">kaddr);
 254{
;
 237 brelm/a>="+code=mark_bum/a>e" c4. name="L454"> 254{
 *o87_sem:
m87_bh);
,  218            4     4s_mousse"e" class="sref">brelup+rhead *cpsznilfs_cpfile_block_get_checkpoint(kaddr);
 * 212            4     4     go8c/a>(87ur_))191" id="L191" class="                         * with a r id/writn mouss and arh protec_edsfromithe2"> 212            4     4     go8st; 212            4     4     go8i  = -unc 237 8r )
 222        " clasclear"" name="e" clpfipfile_block_get_checkpoint" class="sref">nilfs_cpfile_block_get_checkpoint(cpfile)-8lt;);
,  237  222        " classe4"" name="e" clpfipfile_block_get_checkpoint" class="sref">nilfs_cpfile_block_get_checkpoint(cpfile)-8lcp;
8oints" class="srp_ref="c8a 237 );
;
8 212            4     4     go8cret; - /a>ncode=mark_ ssatistics2"> 212            4     4     go8ct;;
191" id="L191" class=" * @ssat: mark_er to a t="+cour> ofncode=mark_ ssatistics2"> 212            4     4     go8ccpfiheck8 * 212            4     4     go8ccp;
8try_size" class="sref">m8_entr89er_bl191" id="L191" class=" * Description: ffe"sre">ret;()cfs2/cps 4 formation abou>ncode=mark_s.ea> 212            4     4     go8))
 212            4     4     go9ref">ret<9a>nretcp90 242<191" id="L191" class=" * %-EIO - I/O error.ea> 212            4     4     go9lfs2/cpfi9 a newly-created checkpo9n hre90_bh 212            4     4     go9l5s2/cpfi9 *m90ur>;
191" id="L191" class=" * %-ENOMEM - Insufficiass amouss ofnmemory availab   ea> 212            4     4     go9l6s2/cpfi9 * 212            4     4     go9l7s2/cpfi9 ry_size" class="sref">m9et_he90er_blhref="fs/nilfs2/cpfi oints" clas/a>;L322"> 222        " clas/a>;e" clf="+code==cpsz" class="sref">cpsz(coef="+csinf
L322"> 222        "e" cf="+csinf
 222  "e" c402" 8s="sref">kaddr);
 254{
);
 243u910ge);
 243;
ret91>unc 249 237  237  2139     91_bh);
 236
brelup+rhead *NILFS_MDT(cpfile)-9h5s2/cpfi9="L258" class="lin4" nam9="L4191sem);
b91"+code=brfiii="fs/nilfs2/cpfc#L239" id="L239" class="lin4"8name="L408"> 198
nilfs_cpfile_get_heaLck_get_headercpfile)-9h7s2/cpfi9 href="+code=b_paglass="9ref">91n < 0)
 256        91file, (cpfile)-9h9s2/cpfi9a href="+code=cp" class=9sref"91> 228        }
 258
retkmap_atomic(9cpfile;
 259 = nilfs_cpfile_blLck_get_headerkaddr);
retL322"> 222  "e" cipfile_block_init" les_fleblock_init"  259brelup+rhead *kaddr);
, 1);
L322"> 222  "e" cipfile_block_init" les_n " 259brelnit" ,ur>;
kaddr);
:
 222  "e" cipfile_block_init" les_nss 259brelnit" ,ur>;
cnoeefnt_heleeff+csiLe02" 8s="sref">kaddr);
 223        9   4 92_bh);
 261kaddr);
 2249     92ile);
 226Lck_get_headercpfile)-9c#L239" i9ef="+code=kaddr" class="9ref">92="sre02" 8s="sref">kaddr);
(9227 * @end: > *
 236
brelup+rhead *NILFS_MDT(cpfile)-9c9s2/cpfi9="L258" class="lin4" nam9="L4292> 228    fs2/cpfs/nilfs2/cpfile.c#L239" id="L239" class="lin4" name="L437"> 237 ret;
ret 212            4     4     go9  retnc">ret k(c> 212            4     4     go9 fs2/cpfi9lass="lin4" name="L433">9233(c> 212            4     4     go9 class="l9="L258" class="lin4" nam9="L4393ur>;
191" id="L191" class=" * @  size: size ofnancode=mark_ assryea> 212            4     4     go9e#L239" i9       ret k(c> 212            4     4     go9 "sregt;<9="+code=mi_sem" class="s9ef">m93er_bl191" id="L191" class=" * @kp: lin4"  to storenthenk(c> 212            4     4     go9  212            4     4     go9g9s2/cpfi9"L240" class="lin4" name9"L43893age 243cpsznilfs_cpfile_block_size_"sref">cno,ukize_" <" id="L204" cla  sizeL322"> 222  "nil            4     4     go9c#L258" i9="L258" class="lin4" nam9="L4394f">cno,a href="fs);
cpsz 243L239" id="L239" aw_k+csinf class=4comme44ref="le"sref">cpsz(coef="> 243p">cpszpe" c402" 8s="sref">kaddr);
ret 254{
cpsz(coef="+csinf
 237 :
 237 cpfile)-9a> *94ile);
 259 = +45re"L418"> 218       i> = +45re"e" class="sref">brel+b">cpsznilfs_cpfile_block_NULL11" class="lin4NULL">nilfs_cpfile_block_Nde=brCPFILE_INOhref="fs4nilfs43de=brCPFILE_INOde=cpfile" class="sref">cpfile)-9e 2359 *brelup+rhead *kaddr);
 * 237 , brelup+rhead *kaddr);
(9ass=4comm944    kaddr);
retn9a href="fs/nil 259L322"> 222       mdt_ini>f="+code=nilfs_cpfile_block_get_header" class="sref">nilfs_cpfile_bl3de=brels_GFPhref="fs4nilfs43de=brels_GFPsref">0re02" 8s="sref">kaddr);
ref="+co9="L240" class="lin4" nam9="L45952+code=brfiii/nilfs2/cpfile.c#L2er  kaddr);
m95/a> )
 218 fa);
"="L40ef="+code=iILFS_Mllass="sref">9afs2/cpfi9="L239" class="lin4" nam9="L4595_bhcpfile)-9c> *9pp;
 222 _dirtymdt_se4"assry_sizef="+code=nilfs_cpfile_block_get_header" class="sref">nilfs_cpfile_bl  sizeL322"> 222  "nil            4     4     go9c 2359;);
kaddr);
"sregt;<9ode=mark_buffely" class=9sref"95 * @end: > *
 259_" clonode=mark_buffer_dirtyr id_k_" clonf="+code=nilfs_cpfile_block_get_header" class="sref">nilfs_cpfile_blraw_kL239" id="L239" aw_k+csire02" 8s="sref">kaddr);
9s2/cpfi9="+code=b_page" class="s9ef">b95> 228    kaddr);
hgt;<9 href="+code=b_paglass="9ref">96f">cno,a href="fs#L204" id="L204" clafa);
"L418"> 218 fa);
"="L40ef="+code=iILFS_Mllass="sref">9eretn9shoc_lificpfi.oints" cla9s="ss96ENOENBUSY-, 1);
L239" id="L239"unlre" class="sref">brelup+rhead *kaddr);
(cp9bhead96_bh);
 243p">cpszpe" c9ef="+code=bufle_bfpfs/nilnt" class="srcoef="+csi"lin4" name="L437"> 237  *c96ur>;
 237 9ef="+code=kaddr" class="9ref">96"+cod4" id="L204" clafa);
"L418"> 218 fa);
"="L4="L258" class="lin4" name="L4359e"sregt;<9lass="lin3" name="L366">9266 = fa);
"L418"> 218 i> = fa);
"e" class="sref">brelup+rhead *kaddr);
;
 237 


Thenoriginal LXR softwarh bynthen>; LXR " cluni>ysref">this experilassal version byn>; lxc@nilux.nosref.
lxc.nilux.no kindly hos_edsby >; Redpill Lilpro ASsref">provi" c ofnLilux " nsulting and operations services sincen1995.