Bug 1663247 - remove static memory allocations from code
Summary: remove static memory allocations from code
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: mainline
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Sanju
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-03 14:41 UTC by Sanju
Modified: 2020-01-31 10:45 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-01-31 10:45:05 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Sanju 2019-01-03 14:41:37 UTC
Description of problem:
In the entire code base, many structures are allocating the memory statically. Instead we can allocate memory dynamically.

One such structure is:
struct glusterd_brickinfo {
    char hostname[NAME_MAX];
    char path[VALID_GLUSTERD_PATHMAX];
    char real_path[VALID_GLUSTERD_PATHMAX];
    char device_path[VALID_GLUSTERD_PATHMAX];
    char mount_dir[VALID_GLUSTERD_PATHMAX];
    char brick_id[1024];   /*Client xlator name, AFR changelog name*/
    char fstype[NAME_MAX]; /* Brick file-system type */
    char mnt_opts[1024];   /* Brick mount options */
..

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Sanju 2020-01-31 10:45:05 UTC
As we are not planning to work on this in near future, closing this as won't fix.


Note You need to log in before you can comment on or make changes to this bug.