Re: [PATCH v2 1/2] kernfs: Convert to u64 id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon,  4 Nov 2019 17:45:19 +0900
Namhyung Kim <namhyung@xxxxxxxxxx> wrote:

> From: Tejun Heo <tj@xxxxxxxxxx>
> 
> The kernfs_id was an union type sharing a 64bit id with 32bit ino +
> gen.  But it resulted in using 32bit inode even on 64bit systems.
> Also dealing with an union is annoying especially if you just want to
> use a single id.
> 
> Thus let's get rid of the kernfs_node_id type and use u64 directly.
> The upper 32bit is used for gen and lower is for ino on 32bit systems.
> The kernfs_id_ino() and kernfs_id_gen() helpers will take care of the
> bit handling depends on the system word size.
> 
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
> Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
> Cc: Martin KaFai Lau <kafai@xxxxxx>
> Cc: Song Liu <songliubraving@xxxxxx>
> Cc: Yonghong Song <yhs@xxxxxx>
> Cc: Jens Axboe <axboe@xxxxxxxxx>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: linux-block@xxxxxxxxxxxxxxx
> Cc: bpf@xxxxxxxxxxxxxxx
> Cc: netdev@xxxxxxxxxxxxxxx
> Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
> [namhyung: fix build error in bpf_get_current_cgroup_id()]
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
> ---
>  fs/kernfs/dir.c                  | 36 ++++++++-----
>  fs/kernfs/file.c                 |  4 +-
>  fs/kernfs/inode.c                |  4 +-
>  fs/kernfs/kernfs-internal.h      |  2 -
>  fs/kernfs/mount.c                | 92 +++++++++++++++++++-------------
>  include/linux/cgroup.h           | 17 +++---
>  include/linux/exportfs.h         |  5 ++
>  include/linux/kernfs.h           | 47 +++++++++-------

>  include/trace/events/writeback.h | 92 ++++++++++++++++----------------

I only looked at the above file, and didn't see anything bad about it.

Acked-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

-- Steve


>  kernel/bpf/helpers.c             |  2 +-
>  kernel/cgroup/cgroup.c           |  5 +-
>  kernel/trace/blktrace.c          | 66 +++++++++++------------
>  net/core/filter.c                |  4 +-
>  13 files changed, 207 insertions(+), 169 deletions(-)




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux