linux/block/partition-generic.c
<<
>>
Prefs
   1/*
   2 *  Code extracted from drivers/block/genhd.c
   3 *  Copyright (C) 1991-1998  Linus Torvalds
   4 *  Re-organised Feb 1998 Russell King
   5 *
   6 *  We now have independent partition support from the
   7 *  block drivers, which allows all the partition code to
   8 *  be grouped in one location, and it to be mostly self
   9 *  contained.
  10 */
  11
  12#include <linux/init.h>
  13#include <linux/module.h>
  14#include <linux/fs.h>
  15#include <linux/slab.h>
  16#include <linux/kmod.h>
  17#include <linux/ctype.h>
  18#include <linux/genhd.h>
  19#include <linux/blktrace_api.h>
  20
  21#include "partitions/check.h"
  22
  23#ifdef CONFIG_BLK_DEV_MD
  24extern void md_autodetect_dev(dev_t dev);
  25#endif
  26 
  27/*
  28 * disk_name() is used by partition check code and the genhd driver.
  29 * It formats the devicename of the indicated disk into
  30 * the supplied buffer (of size at least 32), and returns
  31 * a pointer to that same buffer (for convenience).
  32 */
  33
  34char *disk_name(struct gendisk *hd, int partno, char *buf)
  35{
  36        if (!partno)
  37                snprintf(buf, BDEVNAME_SIZE, "%s", hd->disk_name);
  38        else if (isdigit(hd->disk_name[strlen(hd->disk_name)-1]))
  39                snprintf(buf, BDEVNAME_SIZE, "%sp%d", hd->disk_name, partno);
  40        else
  41                snprintf(buf, BDEVNAME_SIZE, "%s%d", hd->disk_name, partno);
  42
  43        return buf;
  44}
  45
  46const char *bdevname(struct block_device *bdev, char *buf)
  47{
  48        return disk_name(bdev->bd_disk, bdev->bd_part->partno, buf);
  49}
  50
  51EXPORT_SYMBOL(bdevname);
  52
  53/*
  54 * There's very little reason to use this, you should really
  55 * have a struct block_device just about everywhere and use
  56 * bdevname() instead.
  57 */
  58const char *__bdevname(dev_t dev, char *buffer)
  59{
  60        scnprintf(buffer, BDEVNAME_SIZE, "unknown-block(%u,%u)",
  61                                MAJOR(dev), MINOR(dev));
  62        return buffer;
  63}
  64
  65EXPORT_SYMBOL(__bdevname);
  66
  67static ssize_t part_partition_show(struct device *dev,
  68                                   struct device_attribute *attr, char *buf)
  69{
  70        struct hd_struct *p = dev_to_part(dev);
  71
  72        return sprintf(buf, "%d\n", p->partno);
  73}
  74
  75static ssize_t part_start_show(struct device *dev,
  76                               struct device_attribute *attr, char *buf)
  77{
  78        struct hd_struct *p = dev_to_part(dev);
  79
  80        return sprintf(buf, "%llu\n",(unsigned long long)p->start_sect);
  81}
  82
  83ssize_t part_size_show(struct device *dev,
  84                       struct device_attribute *attr, char *buf)
  85{
  86        struct hd_struct *p = dev_to_part(dev);
  87        return sprintf(buf, "%llu\n",(unsigned long long)part_nr_sects_read(p));
  88}
  89
  90static ssize_t part_ro_show(struct device *dev,
  91                            struct device_attribute *attr, char *buf)
  92{
  93        struct hd_struct *p = dev_to_part(dev);
  94        return sprintf(buf, "%d\n", p->policy ? 1 : 0);
  95}
  96
  97static ssize_t part_alignment_offset_show(struct device *dev,
  98                                          struct device_attribute *attr, char *buf)
  99{
 100        struct hd_struct *p = dev_to_part(dev);
 101        return sprintf(buf, "%llu\n", (unsigned long long)p->alignment_offset);
 102}
 103
 104static ssize_t part_discard_alignment_show(struct device *dev,
 105                                           struct device_attribute *attr, char *buf)
 106{
 107        struct hd_struct *p = dev_to_part(dev);
 108        return sprintf(buf, "%u\n", p->discard_alignment);
 109}
 110
 111ssize_t part_stat_show(struct device *dev,
 112                       struct device_attribute *attr, char *buf)
 113{
 114        struct hd_struct *p = dev_to_part(dev);
 115        int cpu;
 116
 117        cpu = part_stat_lock();
 118        part_round_stats(cpu, p);
 119        part_stat_unlock();
 120        return sprintf(buf,
 121                "%8lu %8lu %8llu %8u "
 122                "%8lu %8lu %8llu %8u "
 123                "%8u %8u %8u"
 124                "\n",
 125                part_stat_read(p, ios[READ]),
 126                part_stat_read(p, merges[READ]),
 127                (unsigned long long)part_stat_read(p, sectors[READ]),
 128                jiffies_to_msecs(part_stat_read(p, ticks[READ])),
 129                part_stat_read(p, ios[WRITE]),
 130                part_stat_read(p, merges[WRITE]),
 131                (unsigned long long)part_stat_read(p, sectors[WRITE]),
 132                jiffies_to_msecs(part_stat_read(p, ticks[WRITE])),
 133                part_in_flight(p),
 134                jiffies_to_msecs(part_stat_read(p, io_ticks)),
 135                jiffies_to_msecs(part_stat_read(p, time_in_queue)));
 136}
 137
 138ssize_t part_inflight_show(struct device *dev,
 139                        struct device_attribute *attr, char *buf)
 140{
 141        struct hd_struct *p = dev_to_part(dev);
 142
 143        return sprintf(buf, "%8u %8u\n", atomic_read(&p->in_flight[0]),
 144                atomic_read(&p->in_flight[1]));
 145}
 146
 147#ifdef CONFIG_FAIL_MAKE_REQUEST
 148ssize_t part_fail_show(struct device *dev,
 149                       struct device_attribute *attr, char *buf)
 150{
 151        struct hd_struct *p = dev_to_part(dev);
 152
 153        return sprintf(buf, "%d\n", p->make_it_fail);
 154}
 155
 156ssize_t part_fail_store(struct device *dev,
 157                        struct device_attribute *attr,
 158                        const char *buf, size_t count)
 159{
 160        struct hd_struct *p = dev_to_part(dev);
 161        int i;
 162
 163        if (count > 0 && sscanf(buf, "%d", &i) > 0)
 164                p->make_it_fail = (i == 0) ? 0 : 1;
 165
 166        return count;
 167}
 168#endif
 169
 170static DEVICE_ATTR(partition, S_IRUGO, part_partition_show, NULL);
 171static DEVICE_ATTR(start, S_IRUGO, part_start_show, NULL);
 172static DEVICE_ATTR(size, S_IRUGO, part_size_show, NULL);
 173static DEVICE_ATTR(ro, S_IRUGO, part_ro_show, NULL);
 174static DEVICE_ATTR(alignment_offset, S_IRUGO, part_alignment_offset_show, NULL);
 175static DEVICE_ATTR(discard_alignment, S_IRUGO, part_discard_alignment_show,
 176                   NULL);
 177static DEVICE_ATTR(stat, S_IRUGO, part_stat_show, NULL);
 178static DEVICE_ATTR(inflight, S_IRUGO, part_inflight_show, NULL);
 179#ifdef CONFIG_FAIL_MAKE_REQUEST
 180static struct device_attribute dev_attr_fail =
 181        __ATTR(make-it-fail, S_IRUGO|S_IWUSR, part_fail_show, part_fail_store);
 182#endif
 183
 184static struct attribute *part_attrs[] = {
 185        &dev_attr_partition.attr,
 186        &dev_attr_start.attr,
 187        &dev_attr_size.attr,
 188        &dev_attr_ro.attr,
 189        &dev_attr_alignment_offset.attr,
 190        &dev_attr_discard_alignment.attr,
 191        &dev_attr_stat.attr,
 192        &dev_attr_inflight.attr,
 193#ifdef CONFIG_FAIL_MAKE_REQUEST
 194        &dev_attr_fail.attr,
 195#endif
 196        NULL
 197};
 198
 199static struct attribute_group part_attr_group = {
 200        .attrs = part_attrs,
 201};
 202
 203static const struct attribute_group *part_attr_groups[] = {
 204        &part_attr_group,
 205#ifdef CONFIG_BLK_DEV_IO_TRACE
 206        &blk_trace_attr_group,
 207#endif
 208        NULL
 209};
 210
 211static void part_release(struct device *dev)
 212{
 213        struct hd_struct *p = dev_to_part(dev);
 214        free_part_stats(p);
 215        free_part_info(p);
 216        kfree(p);
 217}
 218
 219struct device_type part_type = {
 220        .name           = "partition",
 221        .groups         = part_attr_groups,
 222        .release        = part_release,
 223};
 224
 225static void delete_partition_rcu_cb(struct rcu_head *head)
 226{
 227        struct hd_struct *part = container_of(head, struct hd_struct, rcu_head);
 228
 229        part->start_sect = 0;
 230        part->nr_sects = 0;
 231        part_stat_set_all(part, 0);
 232        put_device(part_to_dev(part));
 233}
 234
 235void __delete_partition(struct hd_struct *part)
 236{
 237        call_rcu(&part->rcu_head, delete_partition_rcu_cb);
 238}
 239
 240void delete_partition(struct gendisk *disk, int partno)
 241{
 242        struct disk_part_tbl *ptbl = disk->part_tbl;
 243        struct hd_struct *part;
 244
 245        if (partno >= ptbl->len)
 246                return;
 247
 248        part = ptbl->part[partno];
 249        if (!part)
 250                return;
 251
 252        blk_free_devt(part_devt(part));
 253        rcu_assign_pointer(ptbl->part[partno], NULL);
 254        rcu_assign_pointer(ptbl->last_lookup, NULL);
 255        kobject_put(part->holder_dir);
 256        device_del(part_to_dev(part));
 257
 258        hd_struct_put(part);
 259}
 260
 261static ssize_t whole_disk_show(struct device *dev,
 262                               struct device_attribute *attr, char *buf)
 263{
 264        return 0;
 265}
 266static DEVICE_ATTR(whole_disk, S_IRUSR | S_IRGRP | S_IROTH,
 267                   whole_disk_show, NULL);
 268
 269struct hd_struct *add_partition(struct gendisk *disk, int partno,
 270                                sector_t start, sector_t len, int flags,
 271                                struct partition_meta_info *info)
 272{
 273        struct hd_struct *p;
 274        dev_t devt = MKDEV(0, 0);
 275        struct device *ddev = disk_to_dev(disk);
 276        struct device *pdev;
 277        struct disk_part_tbl *ptbl;
 278        const char *dname;
 279        int err;
 280
 281        err = disk_expand_part_tbl(disk, partno);
 282        if (err)
 283                return ERR_PTR(err);
 284        ptbl = disk->part_tbl;
 285
 286        if (ptbl->part[partno])
 287                return ERR_PTR(-EBUSY);
 288
 289        p = kzalloc(sizeof(*p), GFP_KERNEL);
 290        if (!p)
 291                return ERR_PTR(-EBUSY);
 292
 293        if (!init_part_stats(p)) {
 294                err = -ENOMEM;
 295                goto out_free;
 296        }
 297
 298        seqcount_init(&p->nr_sects_seq);
 299        pdev = part_to_dev(p);
 300
 301        p->start_sect = start;
 302        p->alignment_offset =
 303                queue_limit_alignment_offset(&disk->queue->limits, start);
 304        p->discard_alignment =
 305                queue_limit_discard_alignment(&disk->queue->limits, start);
 306        p->nr_sects = len;
 307        p->partno = partno;
 308        p->policy = get_disk_ro(disk);
 309
 310        if (info) {
 311                struct partition_meta_info *pinfo = alloc_part_info(disk);
 312                if (!pinfo)
 313                        goto out_free_stats;
 314                memcpy(pinfo, info, sizeof(*info));
 315                p->info = pinfo;
 237}
 238
p->dev_to_par href="block/partitipar hre"sref">disk);
 309struct info = disk);
partno]metef="block/partitiometef="sref">disk);
 230        .dev_to_par cla href="block/partitipar cla hre="sref">pinfo, , &disk);
partno);
 231        . 312        .dev_to_par cla href="block/partitipar cla hre="sref">pinfo, , &disk);
partno);
 313};
 234
dev_t .pinfo,  315static void , <5r cla href="block/partitipar cla hre="sref">pinsa3f="blref="block/partf="bl/partitblk_trace_attr_group" c.c_f="blref="block/part" c.c_f="bl/partition-generic.c#L31="block/partition-g"line" na3e="L226"> 226{
pa href="block/partitipar cla hre="sref">pinsa3art_type = {
 227       3struc32="+code=p" class="sref">pa href="block/partitipar cla hre="sref">pinsa3L31eue_limit_discard_L31eue/partition-generlass="ssk);
 228
 229       3pr = p);
i =  230       3ir)
 231       3info;
infoe=ditition-generic.c#L31="block/partition-g"line" na3e="L232"> 232       3pinsa3evt = evt =  233}
 234
/* delay ueveue until  235void , <5r cblock/paueveue_suppreblref="block/partblock/paueveue_suppreblipar cla hre="sref">pinfo,  236{
p = , ="sref">pinfo,  237       3ir)
 238}
 239
 240void pr = -ENOMEM;
 241{
p->holder_dir);
,href="s<="+csf="+code=part_attr_group" clasa href="block/partitipar cla hre="sref">pinsa3"ef=ead,  242       3struc34href="+code=err" lass="sref">p)
holder_dir);
 243       3struc34         goto  244
 245       3if (<34href3"+cod32pinfo, <5r cblock/paueveue_suppreblref="block/partblock/paueveue_suppreblipar cla hre="sref">pinfo,  246       3     34href="+code=ptbl" class="sref">pflags,
 247
p = .pinfo, dref">whole_disk, dref">wholee=part_to_dev" cric.c#L282" id="L282" class="line" name="L248"> 248       3ir)
 249       3if (!3a href="+code=    goto  250       3     3  return;
 251
 252       3/* everythot; is up hre runnot;, comueuce */f="+codrtiti32eneric.c#L184" id="L184" class="line" na3e="L253"> 253       3rcu_assign_pointer(ptbl->part[partno], N>);
 254       3 255       3/* supprebl ueveue nfothe hole supprebles it */f="+codrtiti32eneric.c#L184" id="L184" class="line" na3e="L256"> 256       3pdisk);
 257
, pinsa3"ef=ead, NKOBJ_ADDead,  258       3 259}
phd_ss=seqcount_init(&ahd_ss=seqcop" class="sref">p);
 260
 261static 3a hre36/partition-generic.c#L252" id="L252" class3"line" na3e="L262"> 262       3     3      ree_stats" class="sref">info;
infoe=di:ition-generic.c#L252" id="L252" class3"line" na3e="L263"> 263{
free_part_info(p);
 264       3retur3 0;
out_free_stats;
 265}
ffree_part_stats(p);
 266static 3a hre3="+codree_stats" class="sref"ree_stats;
 267       3     36="+code=p" class="sref">p(p);
 268
ERR_PTR(err);
 269struct 3a hre3="+codree_stats" class="svice_del( 270       3     37="+code=part" class="sref">psref">kobject_put(pa)
holder_dir);
 271       3     37="+code=p" class="sref">pdevice_del( 272{
 273       3struc37="+code=rcu_assign_pointer" ref">put_device( 274       3="sref">blk_free_devt( 275       3struc3 ERR_PTR(err);
 276       3struc3  277       3struc37k/pa3titio31eneric.c#L298" id="L298" class="line" na3e="L278"> 278       3const3char *e=DEVICE_ATTR" class="booce_del(gendisk *disk, int  279       3int <3 href=tition-generic.c#L311" id="L311" class="line" na3e="L280"> 280
dbdot_attr_groupsbdot_e=disk_expand_part_tbl"sk->fot_attr_groupsfot_e=ditition-generic.c#L284" id="L284" class3"line" na3e="L281"> 281       3 282       3if (<3 href="+code=err" class="sref">erbdot_attr_groupsbdot_e=diqueue" class="sref">un c.c_nDEVve_capacitpy( 283       3     3  return disk);
flags,
 284       3);
er="bl_CONTead, ,enablot; nDEVve capacitp\ref="block/parrtition-generic.c#L284" id="L284" class3"line" na3e="L285"> 285
pbdot_e=diqueue" class="sref">un c.c_nDEVve_capacitpy(disk);
 286       3if (<3 href="+code=pde=p" class="sref">p);
flags,
 287       3     3  return  288
 289       3);
er="bl_CONTead, ,=runcated\ref="block/parrtition-generic.c#L284" id="L284" class3"line" na3e="L290"> 290       3if (!39f="+3ode=n32      291       3     3  return  292
 293       3if (!39ck/p3rtiti32eneric.c#L184" id="L184" class="line" na3e="L294"> 294       3     3  erdrop_L184" id=lref="block/partbrop_L184" id=lerr" e=gendisk" class="sref">gendisk *disk, int dbdnfo,  295       3     3  gototition-generic.c#L311" id="L311" class="line" na3e="L296"> 296       3}
diiu_assign_pointerdiiu_aa hredevt" class="srpiu_assign_pointer 297
hd_struct *part =  298       3errelref="block/partrele=cotition-generic.c#L31="block/partition-g"line" na3e="L299"> 299       3 300
ibdnfo, bef="+co,  301       4EBUSY);
 302       4pdelete_partitioninvalida"sref">deleterr"" class="sref">disk);
 303       4     4  irelref="block/partrele=corrtiti32eneric.c#L184" id="L184" class4"4ine" na4e="L294"> 294       4 305       4     40/partition-generic.c#L286" id="L286" class4"line" na4e="L306"> 306       4pdiiu_aseqcount_init(&a="sref">diiu_aseqcortitipart_attr_group" clasiu_assign_pointerdisk, );
 307       4part);
diiu_asnexount_init(&a="sref">diiu_asnexortitipart_attr_group" clasiu_assign_pointer 308       4delete_partition(struct disk, );
partno =  299       4="blo40="+code=part" class="sref">p="sref">diiu_asexcount_init(&a="sref">diiu_asexcortitipart_attr_group" clasiu_assign_pointer 310       4if (<41/partition-generic.c#L301" id="L301" class4"line" na4e="L311"> 311       4     4  struct  312       4     41/parttition-generic.c#L297" id="L297" class4"line" na4e="L313"> 313       4     41ck/p3rtiti32eneric.c#L184" id="L184" class4"line" na4e="L314"> 314       4     4  errelcan_L184" id=lref="block/partrelcan_L184" id=lerr" e=gendisk" class="sref">gendisk *disk, int dbdnfo,  315       4     41 gototition-generic.c#L311" id="L311" class4enericloc4/partition-generic.c#L314"bloc41ef="block/pare=disk_part_tbl" classL31sed_L184" id=lref="block/partL31sed_L184" id=l=disk" class="sref">de=DEcref="block/parte=DEck/pask_expand_part_tblULL);
 237}
hd_struct *part =  238
er>);
 309struct 4a hre41"+codree_stats" clasrelcanref="block/partrelcane=MK:ition-generic.c#L252" id="L252" class4"line" na4e="L220"> 230       4.ie=DEcref="block/parte=DEck/pasdev_adev_a lass="sref">p(de=DEcref="block/parte=DEck/pastrtition-generic.c#L311" id="L311" class4"line" na4e3"L221"> 231       4.dkfree(p 312       4.);
 313};
 234
 315static 4oid <4 href3"+cod32pinfo, <5r crelref="block/partrele=cosk_expand_part_tbldrop_L184" id=lref="block/partbrop_L184" id=lerr" i" class="sr">disk, ,  226{
prelref="block/partrele=corrtiti32eneric.c#L184" id="L184" class4"line" na4e="L227"> 227       4struc42 return  228
 229       4i"sk->fot_attr_groupsfot_e=diqueue" class="sref">revalida"sr"sk-> 230       4->fot_attr_groupsfot_e=diqueue" class="sref">revalida"sr"sk->disk);
 231       4pdisk, ,  232       4befinvalida"shead,  233}
(disk);
de=DEcref="block/parte=DEck/pask_expand_part_tblche.c_ef">delete_partitionche.c_ef">deleterr" i" class="sr">disk, ,  234
 235void iIS_ERPTR(de=DEcref="block/parte=DEck/pastrtition-generic.c#L311" id="L311" class4"line" na4e="L236"> 236{
/*f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L237"> 237       4"+code=pde=p" cl * I/O errorpe=adot; the L184" id= table.  If anyf="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L238"> 238}
"+code=pde=p" cl * L184" id= sr"> tried tope=ad beyond EOD,pe=Eryf="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L239"> 239
"+code=pde=p" cl * after un c.cot; nDEVve capacitp.f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L240"> 240void "+code=pde=p" cl */f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L241"> 241{
iPTR_ERPTR(de=DEcref="block/parte=DEck/pas =OMEM" class="sref">ENSPC);
 242       4struc44f="+3ode=r32f="+code=de=p" clalass="sref">er>rint);
er="bl_WARNING/a>);
, &: L184" id= table beyond EOD,p<="+csf="+codeition-generic.c#L311" id="L311" class4"line" na4e="L243"> 243       4struc44         goto erssk->ef="+sk);
 244
ie+codun c.c_nDEVve_capacitpy(disk);
 245       4if (<44  246       4     44href="+code=pde=p" cltition-generic.c#L297" id="L297" class4"line" na4e="L247"> 247
EIO);
 248       4 249       4if (!4a href="+code=ato_dev" c7;dcomueue_>/*f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L250"> 250       4     45="+coato_dev" c7;dcomueue_>"+code=pd* If any L184" id= sr"> tried tope=ad beyond EOD,pEryf="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L251"> 251
"+code=pd* un c.cot; nDEVve capacitp evendparL184" id= table isf="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L252"> 252       4"+code=pd* successfullype=ad as we could be missot; some L184" id=s.f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L253"> 253       4"+code=pd*/f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L254"> 254       4ie=DEcref="block/parte=DEck/paalignment_offset" claccess_beyond_eohead,  255       4print);
er="bl_WARNING/a>);
 256       4, &: L184" id= table L184"allypbeyond EOD,p<="+csf="+codeition-generic.c#L311" id="L311" class4"line" na4e="L257"> 257
p->ef="+sk);
 258       4ie+codun c.c_nDEVve_capacitpy(disk);
 259}
 260
 261static 4a hre46/partition-generic.c#L252" id="L252" class4"line" na4e="L262"> 262       4     46="+code=blk_frto_dev" c7;dcomueue_>/* tell userto_c> that the media / L184" id= table may have changcd */f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L263"> 263{
, part_to_dev(part_err"  class="sref">disk);
pinsa3"ef=ead, NKOBJ_CHANGE/a>);
 264       4retur46/partition-generic.c#L245" id="L245" class4"line" na4e="L265"> 265}
/* Det"+c the eighest L184" id= number hre pe=aa hrDEck/"+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L266"> 266static 4a hre4="+codrto_dev" c7;dcomueue_>"+code=pd* blocla hrf">ditbl.  This is _deoptimiza id= hre nodee=gictlyf="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L267"> 267       4     46="+coato_dev" c7;dcomueue_>"+code=pd* necessarp.f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L268"> 268
"+code=pd*/f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L269"> 269struct 4a hre46 href="+code=foro" class="sref">i>);
er>);
ere=DEcref="block/parte=DEck/paalignment_offset" cl"+codref="block/part"+code=MKt class="sref">er>);
 270       4     47f="+3ode=n32     ie=DEcref="block/parte=DEck/paalignment_offset" clL283lref="block/partL31e=p" cno" class="sref">);
iere=atclasie=da>. 271       4     47 return  *);
 272{
 273       4struc47="+code=rcu_assign_pointer" e+codexphreff">ditblto_dev(ditblerr" i" class="sr">disk,  * 274       4 275       4struc47="+code=free_pto_dev" c7;dcomueue_>/* add L184" id=sd*/f="+codrtiti32eneric.c#L184" id="L184" class4"line" na4e="L276"> 276       4struc476href="+code=foro" class="sref">i>);
er>);
ere=DEcref="block/parte=DEck/paalignment_offset" cl"+codref="block/part"+code=MKt class="sref">er>);
 277       4struc47DISK,
);
iere=atclasie=da>.fromk/patition-generic.c#L265" id="L265" class4"line" na4e="L278"> 278       4const478struct partition_meta_info *nfo = ULL);
 279       4int <47/partition-generic.c#L240" id="L240" class4"line" na4e="L280"> 280
.e=DEcref="block/parte=DEck/paalignment_offset" clL283lref="block/partL31e=p" cno" class="sref">);
iere=atclasie=da>. 281       4. 282       4if (<48f="+3ode=r32f="+code=de=p" clcontinuetition-generic.c#L265" id="L265" class4"line" na4e="L283"> 283       4     48ck/p3rtiti32eneric.c#L184" id="L184" class4"line" na4e="L284"> 284       4fromk/panfo" class="sref">e=DEcref="block/parte=DEck/paalignment_offset" clL283lref="block/partL31e=p" cno" class="sref">);
ifromattr_groupsfromk/patition-generic.c#L265" id="L265" class4"line" na4e="L285"> 285
pfromattr_groupsfromk/panlignfo" class="sref">g/pacapacitpy(disk);
 286       4if (<4 href="+code=pde=p" clde=memcpy" class="sref">rint);
er="bl_WARNING/a>);
 287       4     4  return , &: L 288
->ef="+sk);
N>);
fromk/partition-generic.c#L265" id="L265" class4"line" na4e="L289"> 289       4pe+codun c.c_nDEVve_capacitpy(disk);
 290       4if (!49f="+3ode=n32      291       4     49 return  292
 293       4if (!49ck/p3rtiti32eneric.c#L184" id="L184" class4"line" na4e="L294"> 294       4     49 pfromattr_groupsfromk/pan+href="+code=ss="ere=atclasie=da>.g/pacapacitpy(disk);
 295       4     49 rint);
er="bl_WARNING/a>);
 296       4}
, &: L 297
->ef="+sk);
N>);
. 298       4 299       4pe+codun c.c_nDEVve_capacitpy(disk);
 300
/* ode= e=DEc hre ree=311 */f="+codrtiti32eneric.c#L184" id="L184" class5"line" na5e="L301"> 301       5 302       5 303       5     50         goto /*f="+codrtiti32eneric.c#L184" id="L184" class5"4ine" na5e="L294"> 294       5"+code=pde=p" cl                 * we c_denoderefore L184" id=s of broke= tablesf="+codrtiti32eneric.c#L184" id="L184" class5"line" na5e="L305"> 305       5     50/partato_dev" c7;dcomueue_>"+code=pde=p" cl                 * created by=foroexample c_mera firmware, bste="+codrtiti32eneric.c#L184" id="L184" class5"6ine" na5e="L296"> 296       5"+code=pde=p" cl                 * we "+cod them topthe end of the hole topavoide="+codrtiti32eneric.c#L184" id="L184" class5"7ine" na5e="L297"> 297
"+code=pde=p" cl                 * creatot; invalid ric.c ef="+csf="+codrtiti32eneric.c#L184" id="L184" class5"8ine" na5e="L298"> 298       5"+code=pde=p" cl                 */f="+codrtiti32eneric.c#L184" id="L184" class5"9ine" na5e="L299"> 299       5="blo50 href="+code=    gotode=p" clllllllllref="+code=ss="ere=atclasie=da>.g/pacapacitpy(disk);
fromk/patition-generic.c#L265" id="L265" class5"line" na5e="L310"> 310       5if (<51f="+3ode=n32      311       5     51 return  312       5     51     ition-generic.c#L265" id="L265" class5"line" na5e="L313"> 313       5     51         goto ie=DEcref="block/parte=DEck/paalignment_offset" clL283lref="block/partL31e=p" cno" class="sref">);
ihaspartition_meta_info 314       5     51 nfo = );
info =  315       5     51 pat);
);
disk, );
);
iflags,
 237}
);
info =  238
iIS_ERPTR(d>at);
 309struct 5a hre51 href="+code=    gotode=p" cly" class="sref">rint);
er="bl_ERPTR(,  &: L 230       5.->ef="+sk);
N>);
PTR_ERPTR(d>at);
 231       5. 312       5. 313};
NCONFIG_BLK_DEV_MDead,  234
pe=DEcref="block/parte=DEck/paalignment_offset" clL283lref="block/partL31e=p" cno" class="sref">);
iflags,
 315static 5oid <52 (d>atpart_to_dev(atpart_"+codi" class="sr">d>at);
evt =  226{
 227       5struc52 return  228
kfree(p 229       5 230       5 231       5 232       5erinvalida"sref">delets,
deletsp" cle=gendisk" class="sref">gendisk *disk, int dbdnfo,  233}
 234
errelref="block/partrele=cotition-generic.c#L31="block/partition-5"line" na5e="L235"> 235void  236{
, befinvalida"shead,  237       5 238}
 239
prelref="block/partrele=cosk_expand_part_tbldrop_L184" id=lref="block/partbrop_L184" id=lerr" i" class="sr">disk, ,  240void irelref="block/partrele=corrtiti32eneric.c#L184" id="L184" class5"line" na5e="L241"> 241{
 242       5struc54     ition-generic.c#L265" id="L265" class5"line" na5e="L243"> 243       5struc54="+code=rcu_assign_pointer" s/pacapacitpy(disk);
 243       5struc54seL184" id4da"sref"4297"> 297
dbdnfo,  232       4voia4e="L232"> 2" id=5L283" class4"lue" class="sref"/a>static 4a hre46/partition-generic.c#L252" id="L252" class4"line" na4e="L262"> 262       4     46="+code=blk_frto_dev" c7;dcomueue_>/* tell userto_c> that the media / L184" id= table may have changcd */f="+codrtiti32eneric.c#L184" id="L184" class4"line       5struc54seL184" id4da"sref"4297">lass5"linf="block/partrelcane=MKt5tion-54="bl53href="+code=ptbl"_part_stats" clabdnf6    5  4     44href="+code=pd5=p" c54ass5"7ine" na5e="L227"> 227       5struc52 return  228
p5+code=an>, &5" rneric.c#L252" id= EOD 46=_a = 1tref="+code=partnoOD 46=_a = 1tneric.c#L265" id="L265" cla"L231"> 231       5i>);
er>);
 313};
prelref="block/partrele=cosk_expan="blo4k/p5rtato_dev" c7;dcomueue_>5+code55 href="invalida"sref">deletsp" cle=gendisk"  id="L1845 class4"line" na4e="L2525> 2525/a>       4,  2535      4"+coL311" id="L311" class4"lon-generic.c#L265"lonnerik/pare=disk_part_tlon-generic.c#L265"lonneriss="sref"bdnfo,  297
ent_offset" claccess_bey5nd_eo5ead, de=put_de);
 29> 2924k/partato_dev" cAGve_cCHE_SHIFode=ERR_PTR" clacAGve_cCHE_SHIFoL244"9))>at);
iere=atclasie=da>.e       5struc54seL184" id4da"sref"4297"s="sref">5f="+sk);
ie+5odun c.c_nDEVve_capacitp5(56block/pa = 1e=ruct" class="sreighestructPlonEf=ISde=ERR_PTR" claclonEf=ISn-generic.c#L31="blo"lon-generic.c#L265"lonneriigent_offset" clL283lref="block/partL31es#L297" i5;
disk);
,  259}
de=DEcref="block/ptL313"> 313};
,  310       5i5e="L22(an>, &5" rne)eneric.c#L184" tlon_k/prcod-generic.c#L265"lon_k/prcodn-generic.c#L31="blo"lon-generic.c#L265"lonnerii + f">diiu_aseqcount_"block/parte=DEcne="L">EV_MD((17/par/part4k/partato_dev" cAGve_cCHE_SHIFode=ERR_PTR" clacAGve_cCHE_SHIFoL244 - 9)) - 1)) /par/part9e       5struc54seL184" id4da"sref"4297"+code=rcu5assign_pointer" e="sref"5eveue5ad);
 238
part_to_dev(nfo
BJ_CHANGEe=partition-gen5ric.c56="sref">dbdnf5e="L228"> 228
56283" class4"lue" class="sref"L313"> 313};
iere=atclasie=da>. 266sta5ic 4a56184"allypbeyoclass="sr">disk, iere=atclasie=da>.5ee=gictlyf="+codrtiti32e5eric.5#L184"5e="L228"> 228
i>);
<5 href57o = disk, iere=atclaEXPORT_SYMBO"n-generic.c#L31="blo EOD 46=_a = 1tref="+code=partnoOD 46=_a = 1tnerii       5struc54seL184" id4da"sref"4297"1e=p" cno5 class="sref">);



The original LXR softa5e=4" i" id 5strhttp://sourceforge.net/proneris/lxas>LXR ="diun1"> 241,i" is exprefisk"al versnd_p" i 5strmairto:lxa@f">ux.no">lxa@f">ux.no 241.
lxa.f">ux.no kindly hosL184" i 5strhttp://www.redpill-f">pro.no">Redpill L">pro AS 241,iproviderass5L">uxsulL184"r49 oprea cl}upser5"6in since 1995.